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

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401c69
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x401c7d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401c9e
cmp esi, eax
jae 0x401c77
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401c90
cmp esi, eax
jae 0x401c77
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x405c70
Capabilities:
Get mac address on windows

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
push 0
mov dword [esp + 0xc], 0
call sub.iphlpapi.dll_GetAdaptersInfo
cmp eax, 0x6f
je 0x405c92
xor eax, eax
add esp, 8
ret
mov ecx, dword [esp + 4]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ecx
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x405ccb
lea edx, [esp + 0xc]
push edx
push esi
call sub.iphlpapi.dll_GetAdaptersInfo
test eax, eax
je 0x405cd3
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
xor eax, eax
pop esi
add esp, 8
ret
push ebx
mov bl, byte [esi + 0x194]
test bl, bl
mov eax, 1
je 0x405ce6
movzx eax, bl
mov cl, byte [esi + 0x195]
test cl, cl
mov byte [esp + 0xd], cl
je 0x405cfa
movzx ecx, cl
imul eax, ecx
mov cl, byte [esi + 0x196]
test cl, cl
mov byte [esp + 0xe], cl
je 0x405d0e
movzx edx, cl
imul eax, edx
mov cl, byte [esi + 0x197]
test cl, cl
mov byte [esp + 0xf], cl
je 0x405d22
movzx ecx, cl
imul eax, ecx
mov dl, byte [esi + 0x198]
test dl, dl
je 0x405d32
movzx ecx, dl
imul eax, ecx
mov cl, byte [esi + 0x199]
test cl, cl
je 0x405d42
movzx esi, cl
imul eax, esi
test bl, bl
je 0x405d4b
movzx esi, bl
add eax, esi
mov bl, byte [esp + 0xd]
test bl, bl
je 0x405d58
movzx esi, bl
add eax, esi
mov bl, byte [esp + 0xe]
test bl, bl
je 0x405d65
movzx esi, bl
add eax, esi
mov bl, byte [esp + 0xf]
test bl, bl
je 0x405d72
movzx esi, bl
add eax, esi
test dl, dl
pop ebx
je 0x405d7c
movzx edx, dl
add eax, edx
test cl, cl
je 0x405d85
movzx ecx, cl
add eax, ecx
pop edi
add eax, 0x1bb775d
pop esi
add esp, 8
ret

Function at 0x405fe0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x28
lea eax, [esp + 4]
push eax
push 1
push 0
push str.SoftwareKexunLibrary
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x14], 0x1e
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406049
lea ecx, [esp]
push ecx
lea edx, [esp + 0xc]
push edx
push eax
push eax
mov eax, dword [esp + 0x14]
push 0x4533b8
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406049
cmp dword [esp], 0x1e
ja 0x406049
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 8]
push edx
call fcn.00419d0d
add esp, 4
add esp, 0x28
ret
xor eax, eax
add esp, 0x28
ret
Function at 0x409fc0
Capabilities:
Get hostname
Resolve dns
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x44e943
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
push ebp
push esi
push edi
mov esi, ecx
mov dword [esp + 0x10], 1
call fcn.0042e854
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebp, [eax + 0x10]
mov dword [esp + 0xc], ebp
push 0xff
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x12c], 0
call dword [sym.imp.WS2_32.dll_gethostname]
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40a058
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
test eax, eax
jne 0x40a03b
xor ecx, ecx
jmp 0x40a049
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40a040
sub ecx, edi
push ecx
push eax
lea ecx, [esp + 0x14]
call fcn.00401730
mov ebp, dword [esp + 0xc]
lea edx, [esp + 0xc]
lea ecx, [esi + 0x1b0]
push edx
call fcn.00401850
push 0x2e
push ebp
call fcn.00419d38
add esp, 8
test eax, eax
jne 0x40a07c
or eax, 0xffffffff
jmp 0x40a07e
sub eax, ebp
inc eax
push eax
push 0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
call fcn.00407070
lea edi, [esi + 0x1ac]
push eax
mov ecx, edi
mov byte [esp + 0x128], 1
call fcn.00401850
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x124], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 3
push 0x4542bc
mov ecx, edi
call fcn.00407200
push 0
push 0x3f
push 2
push 0x1aa4
lea ecx, [esi + 0x2fc]
call fcn.0044da29
mov ecx, dword [esi + 0x300]
push 4
lea eax, [esp + 0x14]
push eax
push 0x20
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x18
call fcn.0042e824
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x124], 2
je 0x40a12f
push esi
mov ecx, eax
call fcn.00406110
jmp 0x40a131
xor eax, eax
test eax, eax
mov byte [esp + 0x124], 0
mov dword [esi + 0xec], eax
je 0x40a167
push 0
push 0x3f
push 1
push 0x1a9a
mov ecx, eax
call fcn.0044da29
mov esi, dword [esi + 0xec]
mov edx, dword [esi + 4]
push 5
push edx
call dword [sym.imp.WS2_32.dll_listen]
lea eax, [ebp - 0x10]
mov dword [esp + 0x124], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop esi
pop ebp
jg 0x40a18f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x110]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x11c
ret
Function at 0x40a4d0
Capabilities:
Download url
Read .ini file
Receive data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x204
push ebp
push esi
push edi
mov ebp, ecx
push 0
push 0
push str..control.tmp
push str.http:__localhost:6666_client_client_runcontrol
push 0
mov dword [esp + 0x20], ebp
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jl 0x40a5f0
xor eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov byte [esp + 0x110], 0
mov ecx, 0x3f
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x3f
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
push str..control.tmp
push 0xff
stosw word es:[edi], ax
lea eax, [esp + 0x118]
push eax
push 0
push str.code
push str.CLIENT
call esi
test eax, eax
jbe 0x40a5e3
push str..control.tmp
push 0xff
lea ecx, [esp + 0x18]
push ecx
push 0
push 0x454328
push str.CLIENT
call esi
test eax, eax
jbe 0x40a5e3
lea edx, [esp + 0x110]
push edx
mov ecx, ebp
call fcn.0040a1b0
mov ebp, eax
test ebp, ebp
je 0x40a5e3
mov edi, 0x454324
lea esi, [esp + 0x10]
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a5b0
mov ecx, dword [ebp + 8]
push 8
push ecx
jmp 0x40a5ca
mov edi, 0x454320
lea esi, [esp + 0x10]
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a5d3
mov eax, dword [ebp + 8]
push 9
push eax
mov ecx, dword [esp + 0x14]
call fcn.00406ea0
mov ecx, ebp
call fcn.00406f30
push ebp
call fcn.0042e84f
add esp, 4
push str..control.tmp
call fcn.00419e06
add esp, 4
pop edi
pop esi
pop ebp
mov esp, ebp
pop ebp
ret

Function at 0x40a9a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
call fcn.00444329
mov edi, dword [eax + 0xc]
mov ebx, dword [esp + 0x10]
movzx eax, bx
push 0xf1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40aa11
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esi], eax
je 0x40aa11
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [esi + 0x10], eax
je 0x40aa11
mov cx, word [eax + 4]
mov word [esi + 4], cx
mov dx, word [eax + 2]
push 0xc0c0c0
mov word [esi + 6], dx
movzx eax, word [eax + 2]
push 1
push eax
push ebx
lea ecx, [esi + 8]
call fcn.00427767
pop edi
pop esi
mov eax, 1
pop ebx
ret 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
ret 4
Function at 0x4100d9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x41012c
call fcn.00444329
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x41012c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x410122
xor eax, eax
jmp 0x410245
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x41015c
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x41015c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x410242
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x410189
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.004067b0
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x410242
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4101d2
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x4101d2
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x4101cc
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.004067b0
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x410232
and dword [ebp + 0xc], 0
jmp 0x410232
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x410232
push 0xc
call fcn.0042e824
mov esi, eax
test esi, esi
pop ecx
je 0x410214
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x410216
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x41022d
push dword [ebp - 8]
call fcn.004282fc
jmp 0x410232
call fcn.00428a34
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x410197
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x419467
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00419660
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x419502
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x46db38]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x419502
cmp eax, 1
je 0x419523
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x419502
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4194cf
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4194fe
xor eax, eax
inc eax
jmp 0x419542
cmp edi, eax
jae 0x419506
xor eax, eax
jmp 0x419542
cmp eax, esi
jae 0x41950d
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x46db38]
jmp 0x419526
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41abc4
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x45c950
call fcn.0041b7f0
mov edi, 0x94
mov eax, edi
call fcn.00419660
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 [0x46db38], ecx
mov eax, dword [esi + 4]
mov dword [0x46db44], eax
mov edx, dword [esi + 8]
mov dword [0x46db48], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x46db3c], esi
cmp ecx, 2
je 0x41ac24
or esi, 0x8000
mov dword [0x46db3c], esi
shl eax, 8
add eax, edx
mov dword [0x46db40], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x41ac5f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41ac5f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x41ac77
cmp eax, 0x20b
je 0x41ac64
mov dword [ebp - 0x1c], esi
jmp 0x41ac8b
cmp dword [ecx + 0x84], 0xe
jbe 0x41ac5f
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x41ac85
cmp dword [ecx + 0x74], 0xe
jbe 0x41ac5f
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041ec73
pop ecx
test eax, eax
jne 0x41ac9f
push 0x1c
call fcn.0041aba0
pop ecx
call fcn.0041d849
test eax, eax
jne 0x41acb0
push 0x10
call fcn.0041aba0
pop ecx
call fcn.00421bbc
mov dword [ebp - 4], esi
call fcn.004210c3
test eax, eax
jge 0x41acc9
push 0x1b
call fcn.0041ab7b
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x46e19c], eax
call fcn.00421a9a
mov dword [0x46db24], eax
call fcn.004219f8
test eax, eax
jge 0x41acef
push 8
call fcn.0041ab7b
pop ecx
call fcn.004217c5
test eax, eax
jge 0x41ad00
push 9
call fcn.0041ab7b
pop ecx
push 1
call fcn.0041b9b3
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x41ad16
push eax
call fcn.0041ab7b
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00421768
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x41ad37
movzx eax, word [ebp - 0x40]
jmp 0x41ad3a
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004269fa
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x41ad58
push edi
call fcn.0041bae0
call fcn.0041bb02
jmp 0x41ad8a
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041b82b
ret
Function at 0x41ba1d
Capabilities:
Terminate process

Disassembly:
push 8
push 0x45c9a8
call fcn.0041b7f0
push 8
call fcn.0041ec28
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x46db78], esi
jne 0x41ba51
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x46db74], esi
mov al, byte [ebp + 0x10]
mov byte [0x46db70], al
cmp dword [ebp + 0xc], edi
jne 0x41ba9b
cmp dword [0x46e194], edi
je 0x41ba8b
mov eax, dword [0x46e190]
sub eax, 4
mov dword [0x46e190], eax
cmp eax, dword [0x46e194]
jb 0x41ba8b
mov eax, dword [eax]
cmp eax, edi
je 0x41ba6c
call eax
jmp 0x41ba6c
push 0x4690b8
mov eax, 0x4690b0
call fcn.0041b99b
pop ecx
push 0x4690c4
mov eax, 0x4690bc
call fcn.0041b99b
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x41bacc
cmp dword [ebp + 0x10], edi
jne 0x41bada
mov dword [0x46db78], esi
push dword [ebp + 8]
call fcn.0041b959
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x41bad9
push 8
call fcn.0041eb73
pop ecx
ret
call fcn.0041b82b
ret
Function at 0x41f802
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x41f830
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41f837
cmp ebx, dword [eax + 4]
jae 0x41f837
xor eax, eax
jmp 0x41fa27
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41f848
xor eax, eax
inc eax
jmp 0x41fa26
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41f85e
cmp ecx, edx
jae 0x41f9a3
cmp dword [eax + 4], 0
je 0x41f867
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x41f84f
cmp dword [ebp + 8], 0
je 0x41f889
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41f9a3
cmp eax, esi
jae 0x41f9a3
mov eax, dword [0x46dcf0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41f8ae
cmp dword [esi*4 + 0x46dcf8], edi
je 0x41f9a7
inc esi
cmp esi, eax
jl 0x41f89c
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41fa23
cmp dword [ebp - 8], 0x1000000
jne 0x41fa23
test byte [ebp - 0xc], 0xcc
je 0x41f92c
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41fa23
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41fa23
cmp word [eax + 0x18], 0x10b
jne 0x41fa23
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41fa23
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41f92c
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41f92c
test byte [ecx + 0x27], 0x80
jne 0x41f9a3
push 1
push 0x46dd38
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41f840
mov ecx, dword [0x46dcf0]
test ecx, ecx
mov edx, ecx
jle 0x41f960
lea eax, [ecx*4 + 0x46dcf4]
cmp dword [eax], edi
je 0x41f960
dec edx
sub eax, 4
test edx, edx
jg 0x41f954
test edx, edx
jne 0x41f991
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41f96d
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41f985
lea eax, [edx*4 + 0x46dcf8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41f973
cmp ecx, 0x10
jge 0x41f991
inc ecx
mov dword [0x46dcf0], ecx
push 0
push 0x46dd38
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41f840
xor eax, eax
jmp 0x41fa26
test esi, esi
jle 0x41f840
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x46dd38
call ebx
test eax, eax
jne 0x41f840
cmp dword [esi*4 + 0x46dcf8], edi
je 0x41f9fd
mov eax, dword [0x46dcf0]
lea esi, [eax - 1]
test esi, esi
jl 0x41f9eb
cmp dword [esi*4 + 0x46dcf8], edi
je 0x41f9e7
dec esi
jns 0x41f9db
test esi, esi
jge 0x41f9fb
cmp eax, 0x10
jge 0x41f9f6
inc eax
mov dword [0x46dcf0], eax
lea esi, [eax - 1]
jmp 0x41f9fd
je 0x41fa15
xor ecx, ecx
test esi, esi
jl 0x41fa15
lea eax, [ecx*4 + 0x46dcf8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41fa03
push 0
push 0x46dd38
call ebx
jmp 0x41f840
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x421454
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x46ac74]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x46b1f0]
je 0x421489
inc eax
cmp eax, 0x13
jb 0x42147a
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x46b1f0]
jne 0x4215af
mov eax, dword [0x46db2c]
cmp eax, 1
je 0x421587
cmp eax, edx
jne 0x4214b9
cmp dword [0x46ac70], 1
je 0x421587
cmp ecx, 0xfc
je 0x4215af
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4214ef
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00420a10
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0041b1a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x421523
mov eax, edi
push eax
call fcn.0041b1a0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x45d868
push edi
call fcn.00423bf0
add esp, 0x10
push edi
call fcn.0041b1a0
push dword [esi + 0x46b1f4]
mov ebx, eax
call fcn.0041b1a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00419660
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00420a10
push edi
push ebx
call fcn.00420a20
push 0x45d848
push ebx
call fcn.00420a20
push dword [esi + 0x46b1f4]
push ebx
call fcn.00420a20
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00424ef7
add esp, 0x2c
jmp 0x4215af
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x46b1f4]
push dword [esi]
call fcn.0041b1a0
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 - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0041adca
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x42304d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x423221
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x46e060]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x423221
test cl, 0x48
je 0x4230b8
cmp byte [eax + 5], 0xa
je 0x4230b8
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42310a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4230f2
call fcn.0041c1bd
mov dword [eax], 9
call fcn.0041c1c6
mov dword [eax], esi
jmp 0x423102
cmp eax, 0x6d
je 0x423221
push eax
call fcn.0041c1cf
pop ecx
or eax, 0xffffffff
jmp 0x423223
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x42321c
test eax, eax
je 0x423131
cmp byte [ebx], 0xa
jne 0x423131
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x42313a
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x423216
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x423206
cmp al, 0xd
je 0x42316c
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4231f8
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x423186
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x423181
add dword [ebp + 0x10], 2
jmp 0x4231da
mov dword [ebp + 0x10], eax
jmp 0x4231f4
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4231ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4231f4
cmp dword [ebp - 0xc], 0
je 0x4231f4
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4231cf
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4231da
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4231f7
cmp ebx, dword [ebp + 0xc]
jne 0x4231df
cmp byte [ebp - 1], 0xa
jne 0x4231df
mov byte [ebx], 0xa
jmp 0x4231f7
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0042354c
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4231f8
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x423150
jmp 0x423216
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x423216
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x423223
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret