joyce8/EMBER2024-capa huggingface dataset:
Function at 0x422303
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x44501c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x42234c
call ebp
mov esi, eax
cmp esi, ebx
je 0x422332
mov dword [0x44501c], 1
jmp 0x422351
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x422347
push 2
pop eax
mov dword [0x44501c], eax
jmp 0x42234c
mov eax, dword [0x44501c]
cmp eax, 1
jne 0x4223a9
cmp esi, ebx
jne 0x422364
call ebp
mov esi, eax
cmp esi, ebx
jne 0x422364
xor eax, eax
jmp 0x42245c
cmp word [esi], bx
mov eax, esi
je 0x422379
inc eax
inc eax
cmp word [eax], bx
jne 0x42236b
inc eax
inc eax
cmp word [eax], bx
jne 0x42236b
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00423d0f
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x42239c
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x42245c
push ebp
push esi
push edi
call fcn.00423de0
add esp, 0xc
jmp 0x42238e
cmp eax, 2
je 0x4223b2
cmp eax, ebx
jne 0x42235d
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x42235d
cmp byte [ebp], bl
mov esi, ebp
je 0x4223e8
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x42235d
push esi
add edi, eax
call fcn.0042a590
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x4223c5
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00423d0f
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
jne 0x42240b
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x42235d
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x42244e
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x422463
push edi
call fcn.0042a590
push esi
lea edi, [edi + eax + 1]
call fcn.004204ff
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x422414
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.0041fff9
pop ecx
jmp 0x4223ff
Function at 0x42246f
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x445020]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x4224af
call esi
test eax, eax
je 0x422494
mov dword [0x445020], 1
jmp 0x4224b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4224ab
mov dword [0x445020], 2
jmp 0x4224bd
xor eax, eax
jmp 0x42250b
cmp eax, 1
jne 0x4224b8
call esi
jmp 0x42250b
cmp eax, 2
jne 0x4224ab
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x422507
lea eax, [esi + esi]
push eax
call fcn.00423d0f
mov ebp, eax
test ebp, ebp
pop ecx
je 0x422507
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
je 0x422500
mov eax, ebp
jmp 0x422509
push ebp
call fcn.0041fff9
pop ecx
xor eax, eax
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x4284c0
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
push ebx
push esi
movzx esi, word [ecx + 6]
xor edx, edx
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x4284fa
lea esp, [esp]
mov ecx, dword [eax + 0xc]
cmp edi, ecx
jb 0x4284f0
mov ebx, dword [eax + 8]
add ebx, ecx
cmp edi, ebx
jb 0x4284fc
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x4284e0
xor eax, eax
pop esi
pop ebx
ret

Function at 0x428500
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
push ebp
push esi
xor eax, eax
or edx, 0xffffffff
cmp ecx, 0xffffffff
push edi
je 0x4285e5
mov ebp, 0x20000000
jmp 0x428520
mov esi, dword [esp + 0x14]
lea ecx, [ecx + ecx*2]
lea esi, [esi + ecx*4]
mov ecx, dword [esi + 8]
sub ecx, ebx
and ecx, 0xfffff000
cmp ecx, edx
mov dword [esp + 0xc], esi
je 0x4285a3
test eax, eax
je 0x428551
mov edx, dword [eax + 0xc]
cmp ecx, edx
jb 0x428551
mov edi, dword [eax + 8]
add edi, edx
cmp ecx, edi
jb 0x4285a1
mov eax, dword [ebx + 0x3c]
movzx edi, word [eax + ebx + 6]
movzx edx, word [eax + ebx + 0x14]
add eax, ebx
xor esi, esi
test edi, edi
lea edx, [edx + eax + 0x18]
jbe 0x42858a
lea ebx, [ebx]
mov eax, dword [edx + 0xc]
cmp ecx, eax
jb 0x428580
mov ebp, dword [edx + 8]
add ebp, eax
cmp ecx, ebp
jb 0x428591
add esi, 1
add edx, 0x28
cmp esi, edi
jb 0x428570
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret
mov ebp, 0x20000000
test dword [edx + 0x24], ebp
mov eax, edx
je 0x42858a
mov esi, dword [esp + 0xc]
mov edx, ecx
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4285da
sub ecx, ebx
and ecx, 0xfffff000
mov edi, ecx
cmp edi, edx
je 0x4285da
mov ecx, dword [eax + 0xc]
cmp edi, ecx
jb 0x4285c8
mov edx, dword [eax + 8]
add edx, ecx
cmp edi, edx
jb 0x4285d8
mov eax, ebx
call fcn.004284c0
test eax, eax
je 0x42858a
test dword [eax + 0x24], ebp
je 0x42858a
mov edx, edi
mov ecx, dword [esi]
cmp ecx, 0xffffffff
jne 0x428520
pop edi
pop esi
mov eax, 1
pop ebp
pop ecx
ret
Function at 0x42a322
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
cmp dword [0x4453e8], ebx
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x42a3ca
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x42a35a
xor eax, eax
jmp 0x42a466
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
mov dword [0x4453e8], eax
je 0x42a353
push 0x437ae4
push edi
call esi
push 0x437ad0
push edi
mov dword [0x4453ec], eax
call esi
mov dword [0x4453f0], eax
lea eax, [ebp - 8]
push eax
call fcn.0042027a
test eax, eax
pop ecx
je 0x42a3a6
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00423957
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x42a3ca
push str.GetUserObjectInformationA
push edi
call esi
cmp eax, ebx
mov dword [0x4453f8], eax
je 0x42a3ca
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4453f4], eax
mov eax, dword [0x4453f4]
cmp eax, ebx
je 0x42a431
cmp dword [0x4453f8], ebx
je 0x42a431
call eax
cmp eax, ebx
je 0x42a3fe
lea ecx, [ebp - 0x10]
push ecx
push 0xc
lea ecx, [ebp - 0x1c]
push ecx
push 1
push eax
call dword [0x4453f8]
test eax, eax
je 0x42a3fe
test byte [ebp - 0x14], 1
jne 0x42a431
lea eax, [ebp - 0xc]
push eax
call fcn.004202b1
test eax, eax
pop ecx
je 0x42a419
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00423957
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x42a428
or dword [ebp + 0x10], 0x200000
jmp 0x42a454
or dword [ebp + 0x10], 0x40000
jmp 0x42a454
mov eax, dword [0x4453ec]
cmp eax, ebx
je 0x42a454
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x42a454
mov eax, dword [0x4453f0]
cmp eax, ebx
je 0x42a454
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [0x4453e8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4319cc
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4416f4]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00431961
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00420660
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x431a1b
cmp dword [ebp - 0x1c], 5
jb 0x431a33
jmp 0x431a2f
cmp dword [ebp - 0x10], 1
jne 0x431a33
cmp dword [ebp - 0x1c], 4
ja 0x431a2f
jne 0x431a33
cmp dword [ebp - 0x18], 0
jbe 0x431a33
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4394c8
call fcn.00431838
test eax, eax
jge 0x431a54
mov byte [0x442b64], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0041f6fd
add ebp, 0x78
leave
ret
Function at 0x10cd0a97
Capabilities:
Execute anti-debugging instructions

Disassembly:
pushfd
stc
jmp 0x10d1c804
push edx
cmovb edx, esp
push ebx
movsx ebx, sp
stc
rol edx, cl
push eax
cwd
stc
push ebp
push esi
rdtsc
push edi
push ecx
not ax
btc bp, 0x11
cmova si, ax
mov edx, 0
push edx
rol al, cl
mov edi, dword [esp + 0x28]
ror edi, 1
inc edi
bsf bp, ax
and bx, 0x11c2
neg edi
rol edi, 2
add edi, edx
mov ebp, esp
sub esp, 0xc0
cmp edx, edx
mov ebx, edi
xor dh, 0xc1
clc
rdtsc
mov edx, 0
not eax
sub ebx, edx
rcl ah, cl
lea esi, [0x10d1c861]
sub edi, 4
and eax, ebp
sbb al, bl
sar eax, cl
mov eax, dword [edi]
clc
test ah, bl
cmp dh, ah
xor eax, ebx
not eax
jmp 0x111e32ed
jmp esi
inc eax
test bl, ch
bswap eax
add eax, 0x4aef4898
cmp ebp, ebp
cmp edi, 0x589478da
xor eax, 0x123c2161
test ebp, 0x9b970b8
cmp cl, 0x29
xor ebx, eax
add esi, eax
jmp 0x10d43e0c
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
pop eax
nop
nop
nop
add eax, 0x40a063
nop
nop
sub eax, 0x40a009
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x433030
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
nop
nop
jne 0x43301e
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x417b00
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00488ba0
sub esp, 4
call fcn.004888c0
mov dword [ebp - 0x18], 0
call fcn.00488ab0
call fcn.00488ab0
call sub.KERNEL32.dll_GetUserDefaultLangID
mov dword [ebp - 0x10], eax
call fcn.00488ad0
mov ecx, eax
mov eax, dword [ebp - 0x10]
cdq
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00486e40
sub esp, 0xc
call fcn.00488ad0
mov dword [esp + 4], eax
lea eax, [ebp - 0x18]
mov dword [esp], eax
call fcn.00488820
sub esp, 8
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.00486fb0
sub esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 3
jne 0x417bc0
call fcn.00488ab0
mov dword [esp], 0xd6fd94
call fcn.00488900
sub esp, 4
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.00488900
sub esp, 4
call fcn.00488ad0
mov dword [esp + 4], eax
lea eax, [ebp - 0x18]
mov dword [esp], eax
call fcn.00488820
sub esp, 8
jmp 0x417bc1
nop
call fcn.00488ab0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.00488900
sub esp, 4
call fcn.00488b70
mov dword [ebp - 0xc], eax
nop
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.00488a30
sub esp, 4
mov eax, dword [ebp - 0xc]
leave
ret 4
Function at 0x4394cf
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 0xc], 0
call fcn.004888c0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov eax, str.Kernel32
mov dword [esp], eax
call sub.KERNEL32.dll_GetModuleHandleW
sub esp, 4
mov dword [ebp - 0x18], eax
mov eax, str.GetCurrentProcessId
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
sub esp, 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_CreateRemoteThread
sub esp, 0x1c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x43957e
mov dword [ebp - 0xc], 0
jmp 0x4395ce
nop
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_GetExitCodeThread
sub esp, 8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0xc], eax
nop
mov eax, dword [ebp - 0xc]
leave
ret 4
Function at 0x43a205
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 0xc], 0
call fcn.004888c0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp + 0xc]
mov dword [esp], eax
call fcn.00488950
sub esp, 8
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp + 0x10]
mov dword [esp], eax
call fcn.00488950
sub esp, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0xf003f
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.ADVAPI32.dll_RegCreateKeyExW
sub esp, 0x24
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x43a2fb
mov eax, dword [ebp + 0x10]
mov ecx, eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 0x1c]
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 0x18]
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x14]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.ADVAPI32.dll_RegSetValueExW
sub esp, 0x18
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.ADVAPI32.dll_RegCloseKey
sub esp, 4
mov dword [ebp - 0x20], eax
jmp 0x43a2fc
nop
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call fcn.00488a30
sub esp, 4
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00488a30
sub esp, 4
mov eax, dword [ebp - 0xc]
leave
ret 0x18
Function at 0x4776ee
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
push ecx
mov eax, dword [esp + 0x10]
push edi
xor edi, edi
test eax, eax
je 0x4778c0
cmp word [eax], di
je 0x4778c0
push edi
push 0x80
push 3
push edi
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 8], eax
cmp eax, 0xffffffff
je 0x4778bc
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x14], eax
test eax, eax
jle 0x4778b2
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push ebp
call fcn.004938e1
mov ebx, eax
test ebx, ebx
je 0x4778b0
cmp ebp, 0xffffffff
jne 0x477760
push 2
pop eax
jmp 0x477762
mov eax, ebp
push esi
push eax
push dword [esp + 0x20]
call fcn.00494062
mov esi, eax
test esi, esi
je 0x4778a6
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
jne 0x477782
mov eax, esi
mov dword [esi + 0x30], eax
mov eax, dword [esi + 4]
mov dword [esi + 0x38], eax
mov eax, dword [esp + 0x20]
add eax, 8
mov dword [esi + 0x2c], ebx
push eax
push edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x40], edi
mov dword [esi + 0x14], edi
push dword [0xd92724]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x28], eax
test eax, eax
je 0x4777cc
mov ecx, dword [esp + 0x1c]
mov dword [eax + 4], ecx
mov eax, dword [esi + 0x28]
mov dword [eax], edi
mov eax, dword [esi + 0x28]
add eax, 8
mov dword [esi + 0x44], eax
cmp ebp, 0xffffffff
je 0x4777d8
mov dword [esi + 0x34], 1
push esi
push ebx
call fcn.0048b370
mov edx, dword [esp + 0x28]
mov ebp, 0x4000
pop ecx
pop ecx
mov ecx, edi
mov dword [esp + 0x1c], ecx
lea eax, [ecx + ebp]
cmp eax, edx
jle 0x4777fb
mov ebp, edx
sub ebp, ecx
push ebp
push ebx
call fcn.0048b390
mov dword [esp + 0x2c], eax
pop ecx
pop ecx
test eax, eax
je 0x477895
push edi
lea ecx, [esp + 0x14]
push ecx
push ebp
push eax
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
jne 0x477885
mov eax, dword [esp + 0x1c]
add eax, ecx
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x14], edi
jne 0x47784e
push ecx
push dword [esp + 0x28]
call fcn.004939c9
mov dword [esi + 0x14], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x20]
jl 0x477858
push 1
jmp 0x477859
push edi
push ecx
push ebx
call fcn.0048b5f0
add esp, 0xc
test eax, eax
je 0x477879
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
cmp ecx, edx
jl 0x4777f0
jmp 0x4778a3
push ebx
call fcn.0048b710
pop ecx
mov dword [esi + 0x18], eax
jmp 0x47789c
mov dword [esi + 0x18], 0x100
mov dword [esi + 0x24], str.file_read_error
jmp 0x4778a3
mov dword [esi + 0x18], 1
push ebx
push esi
call fcn.0049398b
mov dword [esi + 0x2c], edi
push ebx
call fcn.0048b7e0
pop ecx
mov edi, esi
pop esi
pop ebp
pop ebx
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x4778c2
xor eax, eax
pop edi
pop ecx
pop ecx
ret 0xc
Function at 0x47790c
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test ebx, ebx
je 0x4779a7
push edi
push 0xd92f60
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0xd92f50]
test edi, edi
je 0x47797a
push ebp
push esi
lea ebp, [edi + 8]
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x477973
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebp
push 0xd92f50
call fcn.004940f7
pop ecx
pop ecx
jmp 0x477975
mov edi, dword [edi]
test edi, edi
jne 0x477948
pop ebp
mov esi, dword [0xd91240]
push 0x10
push 0xd92f50
lea eax, [esi + 1]
mov dword [0xd91240], eax
call fcn.004940c8
pop ecx
pop ecx
push 0xd92f60
mov dword [eax], ebx
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
pop ecx
ret 8

Function at 0x478136
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push dword [0xd92f9c]
call fcn.0048860c
mov esi, eax
or ebp, 0xffffffff
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], ebp
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, dword [esp + 0x28]
mov ecx, eax
movzx edx, word [ecx]
test dx, dx
je 0x478269
mov eax, dword [esi]
mov esi, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x20
push 0x22
pop edi
movzx eax, si
cmp si, word [esp + 0x18]
jne 0x47819c
push 0x20
pop esi
add ecx, 2
movzx eax, word [ecx]
cmp ax, si
je 0x478191
mov dword [esp + 0x10], 1
cmp ax, di
jne 0x4781d6
add ecx, 2
mov edi, ecx
movzx eax, word [ecx]
mov esi, eax
test ax, ax
je 0x478234
push 0x22
mov edx, eax
pop ebx
movzx esi, dx
cmp dx, bx
je 0x478230
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
mov esi, eax
test ax, ax
jne 0x4781bd
jmp 0x478230
test ax, ax
je 0x478244
push 0x22
pop ebx
push 0x20
mov edi, ecx
movzx eax, ax
pop ebp
movzx esi, ax
cmp ax, bp
je 0x47822c
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
cmp ax, bx
jne 0x478221
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
je 0x478221
mov esi, eax
movzx edx, si
cmp si, bx
je 0x478221
add ecx, 2
movzx eax, word [ecx]
mov esi, eax
mov edx, eax
test ax, ax
jne 0x47820a
movzx eax, dx
movzx esi, dx
test dx, dx
jne 0x4781e6
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x28]
mov edx, ecx
test si, si
je 0x47823e
add ecx, 2
mov eax, dword [esp + 0x10]
jmp 0x478248
xor eax, eax
xor edi, edi
cmp dword [esp + 0x1c], ebp
jne 0x478252
test ebx, ebx
jne 0x478271
test eax, eax
je 0x47825b
inc ebp
mov dword [esp + 0x14], ebp
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x478181
test ebx, ebx
jne 0x478285
mov eax, ebp
jmp 0x47828a
test edi, edi
je 0x478285
mov eax, dword [esp + 0x20]
sub edx, edi
sar edx, 1
mov dword [ebx], edx
inc dword [eax]
mov eax, edi
jmp 0x47828a
and dword [ebx], 0
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x478468
Capabilities:
Read file on windows

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 0x10], esi
jle 0x4784bc
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0x14]
and dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push 0
push eax
mov eax, dword [esp + 0x20]
sub eax, esi
push eax
lea eax, [esi + ebp]
push eax
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4784aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x4784b6
add esi, dword [esp + 0x10]
cmp esi, dword [esp + 0x18]
jl 0x47847b
jmp 0x4784ba
add esi, dword [esp + 0x10]
pop ebp
pop ebx
mov eax, esi
pop esi
ret 0xc
Function at 0x479494
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push 0x4793e7
push 0x10
push 0x2c
call fcn.0048ad35
push 0
push 0
push 8
mov dword [0xd92fe0], eax
call fcn.00488677
cmp word [0xd92fd8], 0
mov dword [0xd92fe8], eax
jne 0x47956d
lea eax, [esp]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
push str.ws2_32.dll
sbb eax, eax
inc eax
mov word [0xd92fd8], ax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0xd92fe4], eax
test eax, eax
je 0x47956d
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push eax
call esi
push str.freeaddrinfo
push dword [0xd92fe4]
mov dword [0xd92fc8], eax
call esi
push str.getnameinfo
push dword [0xd92fe4]
mov dword [0xd92fcc], eax
call esi
push str.WSAStringToAddressA
push dword [0xd92fe4]
mov dword [0xd92fd0], eax
call esi
cmp dword [0xd92fc8], 0
mov dword [0xd92fd4], eax
pop esi
je 0x47956d
cmp dword [0xd92fcc], 0
je 0x47956d
cmp dword [0xd92fd0], 0
je 0x47956d
test eax, eax
je 0x47956d
mov dword [0xd92fdc], 1
add esp, 0x190
ret

Function at 0x479601
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
push edi
xor edi, edi
mov ebp, edi
cmp dword [esp + 0x10], edi
je 0x479687
push esi
push edi
push 0x80
push 3
push edi
push 1
push closesocket
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x479686
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
push edi
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x47967e
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], ebx
jne 0x47966f
push ebx
push edi
push dword [esp + 0x1c]
call fcn.004bcbf8
mov ebp, eax
push edi
push 0
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop esi
pop edi
mov eax, ebp
pop ebp
ret 8

Function at 0x479c60
Capabilities:
Create thread

Disassembly:
push ecx
cmp dword [0xd933d8], 0
jne 0x479d0d
push 0xd92ff8
push 0
mov dword [0xd933d8], 1
mov dword [0xd933dc], 0x40
call fcn.004caea0
add esp, 8
test eax, eax
jne 0x479d0d
push 0x479b10
push 0x40
push 0x68
call fcn.0048ad35
mov dword [0xd92ff0], eax
imul eax, dword [0xd933dc], 0x370
push eax
push 8
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0xd92ff8
mov dword [0xd933e0], eax
call fcn.004cbe80
push eax
mov dword [0xd933e4], eax
call fcn.004c8b10
add esp, 8
lea eax, [esp]
push eax
push 0
push 0
push 0x479bc0
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x479d03
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0xd92ff4], 1
mov eax, dword [0xd92ff0]
pop ecx
ret