joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404239
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
push str.SHELL32.DLL
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4043c7
push str.SHBrowseForFolder
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 8], eax
test eax, eax
je 0x4043b9
push 0xc3
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4043b9
push str.SHGetPathFromIDList
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4043b9
xor ebx, ebx
cmp byte [0x4088c0], bl
jne 0x4042fb
push 0x4088c0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, 0x4088c0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4042c2
sub ecx, edx
lea eax, [ecx + 0x4088c0]
push eax
push 0x4088c0
call dword [sym.imp.USER32.dll_CharPrevA]
mov dword [ebp - 4], eax
cmp byte [eax], 0x5c
jne 0x4042fb
push eax
push 0x4088c0
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x3a
je 0x4042fb
mov eax, dword [ebp - 4]
mov byte [eax], bl
lea eax, [ebp - 0x30]
mov byte [0x4087a0], bl
mov dword [ebp - 0x30], esi
mov esi, esp
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 8]
mov ecx, ebx
push eax
mov dword [ebp - 0x24], 0x408598
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], 0x404210
mov dword [ebp - 0x18], 0x4088c0
call dword [0x40a28c]
call ebx
cmp esi, esp
je 0x404344
mov ecx, 4
int 0x29
mov dword [ebp - 8], eax
test eax, eax
je 0x4043a5
mov ebx, dword [ebp - 0xc]
mov esi, esp
push 0x4088c0
push eax
mov ecx, ebx
call dword [0x40a28c]
call ebx
cmp esi, esp
je 0x40436b
mov ecx, 4
int 0x29
cmp byte [0x4088c0], 0
je 0x404388
push 0x4088c0
mov edx, 0x104
mov ecx, 0x4087a0
call fcn.00401645
mov ebx, dword [ebp - 0x10]
mov esi, esp
push dword [ebp - 8]
mov ecx, ebx
call dword [0x40a28c]
call ebx
cmp esi, esp
je 0x4043a5
mov ecx, 4
int 0x29
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
cmp byte [0x4087a0], al
setne al
jmp 0x4043dc
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, 0x4c1
jmp 0x4043cc
mov edx, 0x4c2
xor ebx, ebx
mov ecx, esi
push ebx
push 0x10
push ebx
push ebx
call fcn.004044d8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4046ea
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0xa
mov edi, ecx
mov ebx, edx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, dword [ebp + 8]
ja 0x404756
test ebx, ebx
je 0x404756
test esi, esi
jne 0x40471d
xor eax, eax
jmp 0x404756
push 0xa
push edi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x404719
push esi
push edi
push dword [ebp + 8]
push ebx
call dword [sym.imp.msvcrt.dll_memcpy_s]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x4047fd
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push esi
push edi
xor esi, esi
mov edi, ecx
inc esi
call fcn.00406790
test eax, eax
je 0x404862
cmp dword [0x4091dc], 0
jne 0x404856
test byte [0x408a38], 1
jne 0x404856
push 6
push 0
push 0x403480
push dword [0x408584]
mov edx, 0x7d3
mov dword [0x409404], edi
call fcn.004065e1
sub eax, 6
je 0x404856
sub eax, esi
je 0x404867
sub eax, 0x832
jne 0x404856
mov dword [0x4091dc], esi
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
mov eax, esi
pop esi
ret
xor esi, esi
jmp 0x404862

Function at 0x4049a6
Capabilities:
Create directory

Disassembly:
mov edi, edi
push edi
mov edi, ecx
mov al, byte [edi]
test al, al
je 0x404a0b
push ebx
push esi
lea esi, [edi + 1]
xor ebx, ebx
mov cl, byte [esi]
cmp cl, 0x3a
jne 0x4049ca
cmp byte [edi + 2], 0x5c
jne 0x4049ca
lea esi, [edi + 3]
jmp 0x404a04
cmp al, 0x5c
jne 0x404a04
cmp cl, al
jne 0x404a04
push 2
lea esi, [edi + 2]
pop ebx
jmp 0x404a04
cmp byte [esi], 0x5c
jne 0x4049fb
cmp byte [esi - 1], 0x3a
je 0x4049fb
test ebx, ebx
je 0x4049ec
dec ebx
jmp 0x4049fb
push 0
push edi
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
cmp byte [esi], 0
jne 0x4049da
pop esi
pop ebx
pop edi
ret
Function at 0x405050
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebx
push esi
xor ebx, ebx
mov esi, 0x40132c
push ebx
xor edx, edx
mov ecx, esi
call fcn.004046ea
push 0xa
push esi
push ebx
mov dword [0x409144], eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x409140], eax
test eax, eax
je 0x4051d1
mov eax, dword [0x408584]
test eax, eax
je 0x4050c7
push ebx
push 0x842
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 5
push 0x841
push dword [0x408584]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.00404f70
test eax, eax
jne 0x4050ec
mov ecx, dword [0x408584]
mov edx, 0x4ba
push ebx
push 0x10
push ebx
push ebx
call fcn.004044d8
mov esi, ebx
jmp 0x405177
push edi
push 0x409148
push 1
push 0x404c70
push fcn.00404c10
push 0x404b70
push 0x404af0
push fcn.00404a20
push 0x404d80
push 0x404d60
call dword [sym.imp.Cabinet.dll_FDICreate]
mov edi, eax
add esp, 0x24
test edi, edi
je 0x405158
push 0x409140
push ebx
push 0x404da0
push ebx
push 0x401120
push str.MEMCAB
push edi
call dword [sym.imp.Cabinet.dll_FDICopy]
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x405176
push edi
call dword [sym.imp.Cabinet.dll_FDIDestroy]
pop ecx
test eax, eax
jne 0x405176
mov edx, dword [0x409148]
mov ecx, dword [0x408584]
push ebx
push 0x10
push ebx
push ebx
lea edx, [edx + 0x514]
call fcn.004044d8
mov esi, ebx
pop edi
mov eax, dword [0x409140]
test eax, eax
je 0x40518d
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [0x409140], ebx
test esi, esi
jne 0x4051aa
cmp dword [0x4091d8], ebx
jne 0x4051aa
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4f8
xor ecx, ecx
call fcn.004044d8
test byte [0x408a38], 1
jne 0x4051cf
test byte [0x409a34], 1
jne 0x4051cf
push ebx
push esi
push 0xfa1
push dword [0x408584]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, esi
pop esi
pop ebx
ret
Function at 0x405335
Capabilities:
Delete file
Set current directory
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [0x4091e0]
push edi
jmp 0x40538d
cmp dword [0x408a24], 0
jne 0x40537b
cmp dword [0x409a30], 0
jne 0x40537b
push 0x80
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [edi]
mov esi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, esi
test esi, esi
jne 0x405354
mov eax, dword [0x408a20]
pop edi
pop esi
test eax, eax
je 0x4053f6
cmp dword [0x408a24], 0
jne 0x4053f6
cmp dword [0x409a30], 0
jne 0x4053f6
push ecx
push 0x4091e4
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040174e
test byte [0x409a34], 0x20
je 0x4053db
lea ecx, [ebp - 0x108]
call fcn.004066bc
push 0x4011dc
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x108]
call fcn.00402397
mov eax, dword [0x408a20]
cmp word [0x409a40], 1
je 0x405409
test eax, eax
je 0x405409
call fcn.00401fe5
mov ecx, dword [ebp - 4]
and dword [0x408a20], 0
xor ecx, ebp
call fcn.00406e20
mov esp, ebp
pop ebp
ret

Function at 0x405423
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10c], ecx
mov edi, edx
xor esi, esi
push ebx
push 0x401358
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004016e6
add esp, 0x10
mov edx, 0x104
mov ecx, edi
inc ebx
push dword [ebp - 0x10c]
call fcn.00401645
lea eax, [ebp - 0x108]
mov edx, 0x104
push eax
mov ecx, edi
call fcn.00406659
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4054e2
cmp ebx, 0x190
jl 0x405447
push edi
push 0
push 0x401364
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x4054cd
xor esi, esi
push edi
inc esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406e20
mov esp, ebp
pop ebp
ret 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor esi, esi
test eax, eax
je 0x4054a2
inc esi
mov dword [0x408a20], esi
jmp 0x4054cd
Function at 0x405965
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x405975
sub edx, ecx
lea esi, [edx + 0x14]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x4059b6
xor esi, esi
mov edx, 0x4b5
push esi
push 0x10
push esi
push esi
xor ecx, ecx
call fcn.004044d8
call fcn.0040633c
mov dword [0x409124], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edx, esi
mov ecx, ebx
call fcn.00401645
push 0x401398
mov edx, esi
mov ecx, ebx
call fcn.00406659
xor esi, esi
push esi
push 0x4000080
push 1
push esi
push esi
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x4059a3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4059a3
test al, 0x10
je 0x4059a3
xor eax, eax
mov dword [0x409124], esi
inc eax
jmp 0x4059af
Function at 0x4062d0
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x40631a
push eax
push 0x10
push eax
push eax
mov edx, 0x4f0
xor ecx, ecx
call fcn.004044d8
call fcn.0040633c
mov dword [0x409124], eax
xor eax, eax
jmp 0x406329
push 2
pop edx
push edx
lea ecx, [ebp - 0x108]
call fcn.00405a1f
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406e20
mov esp, ebp
pop ebp
ret

Function at 0x406354
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x1c], ecx
push esi
push 0x4013b4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], esi
xor ebx, ebx
push 0x14
push eax
inc ebx
call fcn.004016e6
jmp 0x4063f7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40641b
lea edx, [edi + 8]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4063a4
sub ecx, esi
mov esi, esp
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x1c]
add eax, edx
push eax
push edx
push dword [edi + 4]
push dword [edi]
call dword [0x40a28c]
call dword [ebp - 0x1c]
cmp esi, esp
je 0x4063d2
mov ecx, 4
int 0x29
push edi
test eax, eax
je 0x406411
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov esi, dword [ebp - 0x20]
lea eax, [ebp - 0x18]
inc esi
push esi
push 0x4013b4
push 0x14
push eax
mov dword [ebp - 0x20], esi
call fcn.004016e6
xor esi, esi
add esp, 0x10
lea eax, [ebp - 0x18]
push 0xa
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x406387
jmp 0x406427
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x406427
mov dword [0x409124], 0x80070714
mov ebx, esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406e20
mov esp, ebp
pop ebp
ret

Function at 0x40655a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push ecx
push 0x4091e4
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040174e
mov edi, 0x4011b8
lea ecx, [ebp - 0x108]
push edi
mov edx, 0x104
call fcn.00406659
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4065c6
test al, 0x10
jne 0x4065c6
push 8
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
jmp 0x4065cd
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.00406e20
mov esp, ebp
pop ebp
ret

Function at 0x406790
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4067a1
xor eax, eax
ret
shr eax, 4
not eax
and eax, 1
ret
Function at 0x40691e
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [0x4081d8]
xor esi, esi
mov dword [ebp - 0xb0], 0xc
mov dword [ebp - 0xac], esi
cmp edi, 0xfffffffe
jne 0x406a46
lea eax, [ebp - 0xa4]
mov dword [0x4081d8], esi
push eax
mov dword [ebp - 0xa4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x406a40
xor edi, edi
inc edi
cmp dword [ebp - 0x94], edi
jne 0x406a40
cmp dword [ebp - 0xa0], 4
jne 0x406a40
cmp dword [ebp - 0x9c], 0xa
jae 0x406a40
push 0x4a
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x406a40
lea eax, [ebp - 0xa8]
push eax
push 0x20019
push esi
push 0x4013c0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406a40
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xb4]
push eax
push esi
push 0x401120
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xa8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x406a12
mov eax, dword [0x4081d8]
jmp 0x406a48
lea edx, [ebp - 0xac]
lea ecx, [ebp - 0x10]
call fcn.004067e5
test eax, eax
je 0x406a40
mov eax, dword [ebp - 0xac]
and eax, 0x3ff
cmp eax, edi
je 0x406a38
cmp eax, 0xd
jne 0x406a40
mov dword [0x4081d8], edi
jmp 0x406a46
mov edi, dword [0x4081d8]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00406e20
mov esp, ebp
pop ebp
ret

Function at 0x406a5d
Capabilities:
Get disk size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
cmp byte [ecx], 0
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
je 0x406aac
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x406aac
mov eax, dword [ebp - 4]
imul eax, dword [ebp - 8]
push 0x400
push dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x406bd0
Capabilities:
Terminate process

Disassembly:
call fcn.004072d8
jmp 0x406bdf
push 0x5c
push 0x4074b8
call fcn.004073a4
and dword [ebp - 0x24], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov dword [ebp - 4], 0xfffffffe
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov edi, dword [eax + 4]
xor esi, esi
mov edx, 0x4088ac
mov ecx, edi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x406c2c
cmp eax, edi
jne 0x406c3e
mov esi, ebx
cmp dword [0x4088b0], ebx
jne 0x406c4b
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x406c7a
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406c15
cmp dword [0x4088b0], 0
jne 0x406c74
mov dword [0x4088b0], ebx
push 0x4010a0
push 0x401094
call fcn.00406dca
pop ecx
pop ecx
test eax, eax
je 0x406c7a
jmp 0x406db3
mov dword [0x4081e4], ebx
cmp dword [0x4088b0], ebx
jne 0x406c9d
push 0x401090
push 0x401088
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x4088b0], 2
test esi, esi
jne 0x406caa
xor eax, eax
mov ecx, 0x4088ac
xchg dword [ecx], eax
cmp dword [0x4088b4], 0
je 0x406cd8
push 0x4088b4
call fcn.004071d0
pop ecx
test eax, eax
je 0x406cd8
push 0
push 2
push 0
mov esi, dword [0x4088b4]
mov ecx, esi
call dword [0x40a28c]
call esi
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
mov edi, dword [ebp - 0x24]
mov cl, byte [esi]
cmp cl, 0x20
ja 0x406d36
test cl, cl
je 0x406cf4
test edi, edi
jne 0x406d36
mov al, byte [esi]
test al, al
je 0x406d04
cmp al, 0x20
ja 0x406d04
inc esi
mov dword [ebp - 0x20], esi
jmp 0x406cf4
test byte [ebp - 0x40], 1
je 0x406d10
movzx eax, word [ebp - 0x3c]
jmp 0x406d13
push 0xa
pop eax
push eax
push esi
push 0
push 0x400000
call main
mov dword [0x4081e0], eax
cmp dword [0x4081f8], 0
jne 0x406d8f
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cl, 0x22
jne 0x406d47
xor eax, eax
test edi, edi
sete al
mov edi, eax
mov dword [ebp - 0x24], edi
movzx eax, cl
push eax
call dword [sym.imp.msvcrt.dll__ismbblead]
pop ecx
test eax, eax
je 0x406d5a
inc esi
mov dword [ebp - 0x20], esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x406ce5
cmp dword [0x4081e4], 0
jne 0x406da3
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x4081e0]
mov dword [ebp - 4], 0xfffffffe
jmp 0x406dbf
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.004073ec
ret

Function at 0x4070af
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x4074e0
call fcn.00407438
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x40710f
cmp eax, 0xffffffff
je 0x40710f
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x407108
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x407108
cmp edx, 0x10000000
jae 0x407108
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x407105
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
call fcn.0040747d
ret 4
Function at 0x407180
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x4071be
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x4071b6
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x4071c0
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x4071a6
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4072a0
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x4072b6
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x4072d1
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x405848
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00408694
test esi, esi
jne 0x40587e
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.0040881c
jmp 0x40589c
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040578c
mov edi, eax
test esi, esi
je 0x40589c
cmp dword [ebx], 0
je 0x40589c
dec esi
jmp 0x405885
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x407268
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00407728
mov byte [esp], al
cmp byte [esp], 0
jne 0x4073f1
test edi, edi
je 0x4073f1
mov byte [esp + 1], 0
test ebp, ebp
jle 0x407331
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x40730c
cmp edi, 0xffffffff
je 0x4072cd
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4072cd
mov byte [esp], 0
jmp 0x4073f1
cmp dword [esi], 1
jg 0x40730c
cmp dword [esi], 0
jne 0x4072fe
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x4072fe
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x4073f1
lea eax, [esp + 0xc]
call fcn.00406f48
dec ebp
test ebp, ebp
jg 0x4072b2
cmp edi, 0xffffffff
je 0x407331
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x40732f
mov byte [esp], 0
jmp 0x4073f1
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x407276
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x407331
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.0040746c
mov edx, eax
mov ebx, dword [0x6708fc]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x407395
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x407393
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x407395
xor edi, edi
cmp byte [esp], 0
je 0x4073bb
mov ebx, dword [esi]
test bl, 1
jne 0x4073d1
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40739b
mov byte [esp + 1], 1
jmp 0x4073d1
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x4073bb
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x407348
cmp byte [esp], 0
je 0x4073f1
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4082f0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x67005c], 0
je 0x408357
cmp word [0x670348], 0xd7b2
jne 0x408319
cmp dword [0x670350], 0
jbe 0x408319
mov eax, 0x670344
call dword [0x670360]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x408384
call fcn.0040910c
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x662032], 0
jne 0x408373
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x408554
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x662034], 0
je 0x40857f
mov edx, edi
mov eax, esi
call dword [0x662034]
mov ebx, eax
jmp 0x408590
mov eax, 8
call fcn.004054c4
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x67005d], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x40851c
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x4085c0
mov eax, ebx
call fcn.004054e0
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc