joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401c10
Capabilities:
Get common file path
Persist via run registry key

Disassembly:
sub esp, 0x180
mov dl, byte [0x40bee4]
push edi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x85]
mov byte [esp + 0x84], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x105]
mov byte [esp + 0x104], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 5]
mov byte [esp + 4], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00403540
test eax, eax
pop edi
jne 0x401c8f
call fcn.00403580
test eax, eax
jne 0x401c8f
lea eax, [esp]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, 0x3ee
jmp 0x401cb9
lea ecx, [esp]
push 0x80
push ecx
push str.Programs
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000001
call fcn.00403e60
add esp, 0x14
test eax, eax
je 0x401d1d
mov eax, 0x3ef
lea edx, [esp + 0x80]
push 0x80
push edx
push eax
mov eax, dword [0x40bed4]
push eax
call fcn.004030c0
add esp, 0x10
test eax, eax
jle 0x401d1d
lea ecx, [esp + 0x80]
lea edx, [esp]
push ecx
push edx
lea eax, [esp + 0x108]
push 0x409110
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x110]
push ecx
call fcn.00401d30
push str.C:INTELM32A
call fcn.00401d30
push str.C:INTELM32AAPPS
call fcn.00401d30
add esp, 0x1c
add esp, 0x180
ret

Function at 0x401d30
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get common file path
Set current directory

Disassembly:
sub esp, 0x240
lea eax, [esp + 0x140]
push edi
push eax
push 0x80
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [esp + 0x248]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x401e31
lea ecx, [esp + 4]
push ebx
push ecx
push 0x409200
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401e04
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
test byte [esp + 0x10], 0x10
je 0x401de4
lea edx, [esp + 0x3c]
push 0x4091fc
push edx
call fcn.004045a0
add esp, 8
test eax, eax
je 0x401de4
lea eax, [esp + 0x3c]
push 0x4091f8
push eax
call fcn.004045a0
add esp, 8
test eax, eax
je 0x401de4
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x1d0]
push ecx
push edi
push 0x409110
push edx
call esi
lea eax, [esp + 0x1e0]
push eax
call fcn.00401d30
add esp, 0x14
jmp 0x401def
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x10]
push edx
push ebx
call ebp
test eax, eax
jne 0x401d8a
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop esi
pop ebp
lea eax, [esp + 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
pop ebx
jne 0x401e31
push eax
call fcn.00404280
add esp, 4
xor eax, eax
pop edi
add esp, 0x240
ret
mov eax, 1
pop edi
add esp, 0x240
ret
Function at 0x402470
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x414
push ebp
lea eax, [esp + 0xc]
push esi
xor ebp, ebp
push eax
push 0xf003f
push ebp
xor esi, esi
push str.SoftwareIntelProunstlDins
push 0x80000002
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402614
mov dl, byte [0x40bee4]
push ebx
push edi
mov ecx, 0x7f
lea edi, [esp + 0x225]
mov byte [esp + 0x224], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x24]
push ecx
push edx
mov edx, dword [esp + 0x20]
push ebp
stosb byte es:[edi], al
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea eax, [esp + 0x1c]
push ebp
lea ecx, [esp + 0x234]
push eax
push ecx
mov ebx, 0x200
push ebp
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x34], ebx
mov esi, 1
call edi
test eax, eax
jne 0x4025fa
lea ecx, [esp + 0x14]
lea edx, [esp + 0x24]
push ecx
push edx
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x234]
mov eax, esi
push ecx
push edx
push eax
mov eax, dword [esp + 0x34]
inc ebp
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
inc esi
call edi
test eax, eax
je 0x402520
test ebp, ebp
je 0x4025fa
lea ecx, [ebp + ebp*4]
shl ecx, 7
push ecx
call fcn.004049b0
mov esi, eax
add esp, 4
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
lea eax, [esi + 0x80]
push edx
mov edx, dword [esp + 0x1c]
push eax
push 0
push 0
push ecx
push esi
push 0
mov dword [esp + 0x30], ebx
push edx
mov dword [esp + 0x40], esi
mov dword [esp + 0x30], 0x80
mov ebx, 1
call edi
test eax, eax
jne 0x4025ed
mov eax, dword [esp + 0x1c]
cmp eax, ebp
jae 0x4025ed
add esi, 0x280
lea ecx, [esp + 0x14]
push ecx
inc eax
lea edx, [esi + 0x80]
lea ecx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
push 0
mov dword [esp + 0x28], eax
push 0
mov eax, ebx
push ecx
push esi
push eax
push edx
mov dword [esp + 0x30], 0x80
mov dword [esp + 0x34], 0x200
inc ebx
call edi
test eax, eax
je 0x4025a5
mov eax, dword [esp + 0x428]
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x20]
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x414
ret
mov eax, esi
pop esi
pop ebp
add esp, 0x414
ret
Function at 0x403150
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
push edi
mov esi, dword [esp + 0xc]
mov edi, eax
shr eax, 4
and edi, 0xf
inc eax
and eax, 0xffff
push ecx
push eax
push 6
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x4031af
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4031af
mov ecx, eax
xor edx, edx
mov ax, word [ecx]
test ax, ax
je 0x4031a6
and eax, 0xffff
add ecx, 2
cmp edx, edi
mov esi, eax
je 0x4031b4
lea ecx, [ecx + esi*2]
jmp 0x4031a9
add ecx, 2
inc edx
cmp edx, 0x10
jl 0x40318b
pop edi
xor eax, eax
pop esi
ret
mov edx, dword [esp + 0x1c]
lea eax, [edx - 1]
cmp esi, eax
jle 0x4031c1
mov esi, eax
mov edi, dword [esp + 0x18]
push esi
push ecx
push edi
call fcn.00404a50
add esp, 0xc
mov word [edi + esi*2], 0
mov eax, edi
pop edi
pop esi
ret

Function at 0x403220
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
push esi
mov esi, dword [esp + 8]
push edi
and ecx, 0xffff
push eax
push ecx
push 5
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x40325b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40325b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
pop edi
pop esi
ret
mov eax, edi
pop edi
pop esi
ret

Function at 0x403580
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
lea eax, [esp]
mov dword [esp], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x10], 2
jne 0x4035b3
cmp dword [esp + 4], 5
jne 0x4035b3
mov eax, 1
add esp, 0x94
ret
xor eax, eax
add esp, 0x94
ret
Function at 0x403600
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x214
call fcn.00403580
test eax, eax
je 0x403626
mov eax, dword [esp + 0x218]
push eax
call fcn.00402dc0
add esp, 4
add esp, 0x214
ret
mov eax, dword [0x40bee0]
mov dword [esp + 4], 0
test eax, eax
mov eax, str.SystemCurrentControlSetServicesClassModem
jne 0x403641
mov eax, str.SystemCurrentControlSetServicesClassNet
lea ecx, [esp]
push ecx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403715
push esi
lea edx, [esp + 0x10]
push edi
push edx
mov edx, dword [esp + 0xc]
push eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push eax
push eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x2c]
push eax
push ecx
push 0
push edx
mov dword [esp + 0x30], 0x200
mov esi, 1
call edi
test eax, eax
jne 0x403708
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea eax, [esp + 0x20]
push 1
push eax
call fcn.00403980
add esp, 8
test eax, eax
jne 0x4036c5
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.00403720
add esp, 8
test eax, eax
je 0x4036db
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x20]
push eax
push ecx
call ebp
mov ecx, dword [esp + 0x10]
inc ecx
dec esi
mov dword [esp + 0x10], ecx
lea edx, [esp + 0x18]
lea ecx, [esp + 0x14]
push edx
push 0
push 0
push 0
lea edx, [esp + 0x30]
mov eax, esi
push ecx
push edx
push eax
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x34], 0x200
inc esi
call edi
test eax, eax
je 0x40369c
pop ebp
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, dword [esp + 4]
add esp, 0x214
ret

Function at 0x403720
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x208
mov eax, dword [0x40bee0]
mov dword [esp + 4], 0x200
test eax, eax
je 0x4037a8
mov ecx, dword [esp + 0x210]
mov edx, dword [esp + 0x20c]
lea eax, [esp]
push eax
push 0xf003f
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4037a8
mov edx, dword [esp]
lea eax, [esp + 4]
lea ecx, [esp + 8]
push eax
push ecx
push 0
push 0
push str.DriverDesc
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40379d
lea eax, [esp + 8]
push eax
push str.Intel_R__PRO_100_Modem56_CardBus_II
call fcn.00404410
add esp, 8
neg eax
sbb eax, eax
inc eax
add esp, 0x208
ret
mov ecx, dword [esp]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
add esp, 0x208
ret
Function at 0x403c00
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x28c
mov al, byte [0x40bee4]
push edi
mov byte [esp + 0x10], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x294]
lea ecx, [esp + 4]
push ecx
push 0xf003f
stosw word es:[edi], ax
push 0
push str.Bindings
push edx
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403ceb
lea eax, [esp + 8]
push esi
lea ecx, [esp + 0x94]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push eax
push ecx
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x1c]
push 0
lea eax, [esp + 0x24]
push edx
push eax
push 0
push ecx
mov dword [esp + 0x30], 0x80
mov dword [esp + 0x2c], 0x200
mov esi, 1
call edi
test eax, eax
jne 0x403cd2
lea edx, [esp + 0x14]
push edx
call fcn.00403d00
add esp, 4
lea ecx, [esp + 0xc]
lea edx, [esp + 0x94]
mov eax, esi
push ecx
push edx
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x24]
push ecx
push edx
push eax
mov eax, dword [esp + 0x24]
push eax
mov dword [esp + 0x30], 0x80
mov dword [esp + 0x2c], 0x200
inc esi
call edi
test eax, eax
je 0x403c8b
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov eax, 1
pop edi
add esp, 0x28c
ret
xor eax, eax
pop edi
add esp, 0x28c
ret
Function at 0x403d00
Capabilities:
Delete registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x68c
mov dl, byte [0x40bee4]
push ebx
push ebp
push edi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x99]
mov byte [esp + 0x98], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], dl
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x69c]
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
stosw word es:[edi], ax
push str.Bindings
push ebx
stosb byte es:[edi], al
push str.EnumNetwork
lea eax, [esp + 0xa4]
push str._s_s_s
push eax
call ebp
add esp, 0x14
lea ecx, [esp + 0xc]
lea edx, [esp + 0x98]
push ecx
push 0xf003f
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403e4f
lea eax, [esp + 0x10]
push esi
lea ecx, [esp + 0x29c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push eax
push ecx
mov ecx, dword [esp + 0x18]
push 0
lea edx, [esp + 0x24]
push 0
lea eax, [esp + 0x2c]
push edx
push eax
push 0
push ecx
mov dword [esp + 0x38], 0x80
mov dword [esp + 0x34], 0x200
mov esi, 1
call edi
test eax, eax
jne 0x403e09
lea edx, [esp + 0x1c]
push edx
call fcn.00403d00
add esp, 4
lea ecx, [esp + 0x14]
lea edx, [esp + 0x29c]
mov eax, esi
push ecx
push edx
push 0
lea ecx, [esp + 0x24]
push 0
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
inc esi
call edi
test eax, eax
je 0x403dd2
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
push str.EnumNetwork
lea edx, [esp + 0x4a4]
push 0x409110
push edx
call ebp
add esp, 0x10
lea eax, [esp + 0x49c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x68c
ret
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x68c
ret

Function at 0x403e60
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp]
push esi
xor esi, esi
push eax
push 0xf003f
push esi
push ecx
push edx
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403eb7
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 8]
push ecx
push esi
push esi
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403eac
mov esi, 1
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ecx
ret
Function at 0x404150
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x210
mov eax, dword [esp + 0x21c]
push ebx
mov ebx, dword [esp + 0x218]
push esi
push edi
mov edi, dword [esp + 0x224]
test eax, eax
mov dword [esp + 0x10], 0x200
je 0x40419d
push edi
push ebx
call fcn.004033d0
add esp, 8
test eax, eax
jne 0x40419d
push eax
call fcn.00404280
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x210
ret
lea eax, [esp + 0xc]
push eax
push 0xf003f
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4041cb
push 0
call fcn.00404280
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x210
ret
lea ecx, [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push ecx
mov ecx, dword [esp + 0x10]
push 0
push 0
lea edx, [esp + 0x1c]
push 0
lea eax, [esp + 0x2c]
push edx
push eax
push 0
push ecx
call esi
test eax, eax
jne 0x40423b
mov edx, dword [esp + 0x228]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x1c]
push edx
push eax
push ecx
call fcn.00404150
add esp, 0xc
test eax, eax
je 0x40425d
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
mov edx, dword [esp + 0x10]
push 0
push 0
push 0
lea ecx, [esp + 0x2c]
push eax
push ecx
push 0
push edx
mov dword [esp + 0x30], 0x200
call esi
test eax, eax
je 0x4041f3
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebx
add esp, 0x210
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x210
ret
Function at 0x404b90
Capabilities:
Accept command line arguments

Disassembly:
call fcn.0041e229
push 0x4081f0
push 0x406c88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x40c15c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40c158], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40c154], ecx
shr eax, 0x10
mov dword [0x40c150], eax
call fcn.00405b20
test eax, eax
jne 0x404bfa
push 0x1c
call fcn.00404d60
add esp, 4
mov dword [ebp - 4], 0
call fcn.00406990
call fcn.00405270
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40c3f8], eax
call fcn.00406830
mov dword [0x40bef0], eax
test eax, eax
je 0x404c2d
mov eax, dword [0x40c3f8]
test eax, eax
jne 0x404c37
push 0xffffffffffffffff
call fcn.004059e0
add esp, 4
call fcn.00406580
call fcn.00406490
call fcn.004059b0
mov esi, dword [0x40c3f8]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x404d16
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x404c7e
test al, al
je 0x404c7e
and eax, 0xff
push eax
call fcn.00406430
add esp, 4
test eax, eax
je 0x404c58
inc esi
mov dword [ebp - 0x64], esi
jmp 0x404c58
cmp byte [esi], 0x22
jne 0x404c87
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x404c97
cmp al, 0x20
ja 0x404c97
inc esi
mov dword [ebp - 0x64], esi
jmp 0x404c87
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x404cb8
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x404cbd
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.004059e0
jmp 0x404cfb
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x404c87
inc esi
mov dword [ebp - 0x64], esi
jmp 0x404d16

Function at 0x404d60
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40bef8], 1
jne 0x404d6e
call fcn.00406d60
mov eax, dword [esp + 4]
push eax
call fcn.00406da0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x405a20
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40c18c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x405a3f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x40c188], 1
mov byte [0x40c184], bl
jne 0x405a99
mov ecx, dword [0x40c3ec]
test ecx, ecx
je 0x405a87
mov esi, dword [0x40c3e8]
sub esi, 4
cmp esi, ecx
jb 0x405a87
mov eax, dword [esi]
test eax, eax
je 0x405a80
call eax
mov ecx, dword [0x40c3ec]
sub esi, 4
cmp esi, ecx
jae 0x405a72
push 0x409018
push 0x409014
call fcn.00405ad0
add esp, 8
push 0x409020
push 0x40901c
call fcn.00405ad0
add esp, 8
test ebx, ebx
jne 0x405ac0
push ebp
mov dword [0x40c18c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x406830
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40c2a8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x406872
call edi
mov esi, eax
test esi, esi
je 0x40685c
mov eax, 1
jmp 0x40686d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40697f
mov eax, 2
mov dword [0x40c2a8], eax
cmp eax, 1
jne 0x406912
test esi, esi
jne 0x40688b
call edi
mov esi, eax
test esi, esi
je 0x40697f
cmp word [esi], 0
mov eax, esi
je 0x4068a5
add eax, 2
cmp word [eax], 0
jne 0x406893
add eax, 2
cmp word [eax], 0
jne 0x406893
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x406904
push edi
call fcn.00404ae0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x406904
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4068f6
push ebx
call fcn.00404a90
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40697f
test ebx, ebx
jne 0x406923
call ebp
mov ebx, eax
test ebx, ebx
je 0x40697f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40693b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40692b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40692b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00404ae0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40695d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x406da0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40b7b0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x406dc4
add eax, 8
inc ebp
cmp eax, 0x40b840
jb 0x406db5
cmp ecx, dword [ebp*8 + 0x40b7b0]
jne 0x406f6b
mov eax, dword [0x40bef8]
cmp eax, 1
je 0x406f2d
test eax, eax
jne 0x406df0
cmp dword [0x4095d4], 1
je 0x406f2d
cmp ecx, 0xfc
je 0x406f6b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x406e2b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x406e74
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4084d4
add ebx, ecx
push ebx
call fcn.004070c0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4084b4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40b7b4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00407390
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40c2e0]
test eax, eax
je 0x406f3e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x406f48
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40b7b4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret