joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404859
Capabilities:
Encode data using base64 via winapi
Get system firmware table

Disassembly:
push ecx
push ecx
push esi
push 0x5e
push 0x414590
xor esi, esi
push 2
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
call fcn.00404d30
cmp dword [esp + 0x10], 1
je 0x40488e
push 0x56
push 0x4144e0
push 2
call fcn.00404d30
jmp 0x404a4e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemFirmwareTable]
push ebp
push edi
push esi
push esi
push esi
mov ebp, 0x52534d42
push ebp
call ebx
mov edi, eax
cmp edi, esi
jne 0x4048b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x414480
jmp 0x404a41
lea eax, [edi - 8]
push eax
push 0x414428
push 1
call fcn.00404bb0
add esp, 0xc
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x4048ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4143e0
jmp 0x404a41
push edi
push esi
push 0
push ebp
call ebx
cmp eax, edi
jbe 0x40490a
push 0x25
push 0x414390
push 2
call fcn.00404d30
jmp 0x404a2a
movzx eax, byte [esi + 3]
push dword [esi + 4]
mov ecx, eax
and ecx, 0xf
push ecx
shr eax, 4
push eax
movzx eax, byte [esi + 2]
push eax
movzx eax, byte [esi + 1]
push eax
push 0x414308
push 1
call fcn.00404bb0
mov edi, dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
add esp, 0x1c
lea eax, [esp + 0x10]
push eax
push 0
push 0xb
push dword [esi + 4]
lea ebx, [esi + 8]
push ebx
call edi
test eax, eax
jne 0x404961
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4142b0
jmp 0x4049ed
mov eax, dword [esp + 0x10]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x404984
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4143e0
jmp 0x4049ed
lea eax, [esp + 0x10]
push eax
push ebp
push 0xb
push dword [esi + 4]
push ebx
call edi
test eax, eax
jne 0x4049ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4142b0
push 2
call fcn.00404bb0
add esp, 0xc
jmp 0x4049d6
push 0x19
push 0x41427c
push 1
call fcn.00404d30
push dword [esp + 0x10]
push ebp
push 1
call fcn.00404d30
push 2
push 0x40d7b0
push 1
call fcn.00404d30
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x4049f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x414238
push 2
call fcn.00404bb0
add esp, 0xc
push 0x1b
push 0x4141fc
push 1
call fcn.00404d30
movzx eax, byte [esi + 1]
mov ecx, 0x100
imul ax, cx
movzx ecx, byte [esi + 2]
add ax, cx
movzx eax, ax
push eax
push dword [esi + 4]
push ebx
call fcn.00401041
mov dword [esp + 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x404a4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x414238
push 2
call fcn.00404bb0
add esp, 0xc
pop edi
pop ebp
pop ebx
xor eax, eax
cmp dword [esp + 8], eax
pop esi
sete al
pop ecx
pop ecx
ret
Function at 0x404b20
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x408
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x404], eax
mov ecx, dword [esp + 0x40c]
lea eax, [esp + 0x410]
push eax
push ecx
lea edx, [esp + 8]
push edx
call dword [sym.imp.USER32.dll_wvsprintfA]
test eax, eax
jne 0x404b7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4146e8
call fcn.00404b20
add esp, 8
mov ecx, dword [esp + 0x404]
xor ecx, esp
call fcn.00404ab0
add esp, 0x408
ret
mov byte [esp + eax], 0
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x404]
xor ecx, esp
mov eax, 1
call fcn.00404ab0
add esp, 0x408
ret

Function at 0x404bb0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x80c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x808], eax
push ebx
push esi
mov esi, dword [esp + 0x818]
lea eax, [esi - 1]
push edi
mov edi, 0x508
cmp eax, 1
ja 0x404d0f
mov edx, dword [esp + 0x820]
lea ecx, [esp + 0x824]
push ecx
push edx
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_wvsprintfW]
mov ebx, eax
test ebx, ebx
jne 0x404c13
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push 0x414714
jmp 0x404d07
lea esi, [esi + esi*2]
add esi, esi
add esi, esi
mov eax, dword [esi + esi + 0x406068]
add esi, esi
test eax, eax
jne 0x404c44
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x808]
xor ecx, esp
call fcn.00404ab0
add esp, 0x80c
ret
cmp eax, 3
jne 0x404ca0
mov eax, dword [esi + 0x406058]
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x404c88
xor eax, eax
cmp dword [esp + 0xc], ebx
pop edi
pop esi
sete al
pop ebx
mov ecx, dword [esp + 0x808]
xor ecx, esp
call fcn.00404ab0
add esp, 0x80c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, dword [esi + 0x406064]
je 0x404d0f
push edi
push 0x41476c
jmp 0x404d01
cmp dword [esi + 0x40606c], 2
jne 0x404d0f
mov eax, dword [esi + 0x406058]
push 0
lea ecx, [esp + 0x10]
push ecx
lea edi, [ebx + ebx]
push edi
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404ceb
xor eax, eax
cmp dword [esp + 0xc], edi
pop edi
pop esi
sete al
pop ebx
mov ecx, dword [esp + 0x808]
xor ecx, esp
call fcn.00404ab0
add esp, 0x80c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, dword [esi + 0x406064]
je 0x404d0f
push edi
push 0x414740
mov dword [esi + 0x406064], edi
call fcn.00404b20
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x814]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00404ab0
add esp, 0x80c
ret
Function at 0x404d30
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
lea eax, [esi - 1]
push edi
mov edi, 0x508
cmp eax, 1
ja 0x404e99
lea esi, [esi + esi*2]
add esi, esi
add esi, esi
mov eax, dword [esi + esi + 0x406068]
add esi, esi
test eax, eax
jne 0x404d69
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 0xc
cmp eax, 3
jne 0x404df4
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
test ebx, ebx
jns 0x404d96
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404d83
sub eax, edx
sar eax, 1
mov ebx, eax
test ebx, ebx
je 0x404d5d
mov edx, dword [esi + 0x406058]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push 0
lea ecx, [esp + 0x20]
push ecx
push ebx
push edi
push edx
call ebp
test eax, eax
je 0x404dd5
mov eax, dword [esp + 0x1c]
sub ebx, eax
je 0x404d5d
mov ecx, dword [esi + 0x406058]
push 0
lea edi, [edi + eax*2]
lea eax, [esp + 0x20]
push eax
push ebx
push edi
push ecx
call ebp
test eax, eax
jne 0x404db4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, dword [esi + 0x406064]
je 0x404e99
push edi
push 0x41476c
jmp 0x404e8b
cmp dword [esi + 0x40606c], 2
jne 0x404e99
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
test eax, eax
jns 0x404e23
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404e12
sub eax, edx
sar eax, 1
test eax, eax
je 0x404d5d
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x20]
push edx
lea ebx, [eax + eax]
mov eax, dword [esi + 0x406058]
push ebx
push edi
push eax
call ebp
test eax, eax
je 0x404e75
jmp 0x404e50
mov eax, dword [esp + 0x1c]
sub ebx, eax
je 0x404d5d
mov edx, dword [esi + 0x406058]
push 0
lea ecx, [esp + 0x20]
push ecx
push ebx
lea edi, [edi + eax*2]
push edi
push edx
call ebp
test eax, eax
jne 0x404e50
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, dword [esi + 0x406064]
je 0x404e99
push edi
push 0x414740
mov dword [esi + 0x406064], edi
call fcn.00404b20
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 0xc
Function at 0x432003
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
mov eax, section..rsrc
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
je 0x432072
nop
nop
nop
nop
nop
mov ebx, 0x40c7d0
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x71094171
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
loop 0x432060
nop
nop
nop
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
nop
je 0x4320d2
nop
nop
mov ebx, 0x42f314
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x1fd23065
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
loop 0x4320c0
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x100070d0
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
cmp dword [ebp + 0x1c], 0
je 0x100070f1
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x10], ecx
jmp 0x10007109
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
push 4
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x10007120
xor eax, eax
jmp 0x10007244
mov edx, dword [ebp - 0xc]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x5a4d
je 0x10007136
xor eax, eax
jmp 0x10007244
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0x4550
je 0x10007154
xor eax, eax
jmp 0x10007244
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x80]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x18]
jne 0x10007172
xor eax, eax
jmp 0x10007244
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0xc], 0
je 0x10007241
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx], 0
je 0x10007233
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x10]
jne 0x10007225
push 4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
jne 0x100071d6
cmp dword [ebp + 0x18], 0
je 0x100071c5
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x14]
mov dword [edx], eax
mov dword [ebp - 8], 1
jmp 0x10007225
lea ecx, [ebp - 0x14]
push ecx
push 0x40
push 4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10007225
cmp dword [ebp + 0x18], 0
je 0x100071fc
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x14]
mov dword [eax], ecx
mov dword [ebp - 8], 1
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x20], edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push 4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x1c]
add eax, 4
mov dword [ebp - 0x1c], eax
jmp 0x1000718b
mov ecx, dword [ebp - 4]
add ecx, 0x14
mov dword [ebp - 4], ecx
jmp 0x10007172
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
Function at 0x1000d32b
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x2c
call fcn.1000e610
mov ecx, eax
call fcn.1000b4a0
mov dword [ebp - 4], eax
cmp dword [0x10047c44], 0
je case.0x1000d3e9.5
mov ecx, dword [ebp + 0xc]
and ecx, 0xff
test ecx, ecx
je case.0x1000d3e9.5
mov edx, dword [ebp - 4]
movsx eax, byte [edx + 1]
test eax, eax
jne 0x1000d3c5
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x7e
je 0x1000d3c5
mov eax, dword [ebp - 4]
movsx ecx, byte [eax]
mov dword [ebp - 8], ecx
push 0x10
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx edx, ax
test edx, edx
je 0x1000d3aa
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [eax + 0x43c]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
je 0x1000d3c0
mov al, byte [ebp - 8]
push eax
mov ecx, dword [ebp - 0x10]
call dword [ecx + 4]
add esp, 4
jmp 0x1000d4ae
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
sub eax, 0xe
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x42
ja case.0x1000d3e9.5
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov cl, byte [edx + 0x1000d4cc]
jmp dword [ecx*4 + 0x1000d4b4]
mov eax, dword [ebp - 0x10]
cmp dword [eax + 4], 0
je 0x1000d404
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x10]
call dword [ecx + 4]
add esp, 4
jmp 0x1000d4ae
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
je 0x1000d41d
push 0xa
mov eax, dword [ebp - 0x10]
call dword [eax + 4]
add esp, 4
jmp 0x1000d4ae
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 4], 0
je 0x1000d436
push 0x20
mov edx, dword [ebp - 0x10]
call dword [edx + 4]
add esp, 4
jmp 0x1000d4ae
mov eax, dword [ebp - 0x10]
cmp dword [eax + 4], 0
je 0x1000d44c
push 0xfffffffffffffffe
mov ecx, dword [ebp - 0x10]
call dword [ecx + 4]
add esp, 4
jmp 0x1000d4ae
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
je 0x1000d462
push 0xfffffffffffffffd
mov eax, dword [ebp - 0x10]
call dword [eax + 4]
add esp, 4
jmp 0x1000d4ae
mov ecx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp - 0x10]
add ecx, 0x10
call fcn.1002513c
and eax, 0xff
test eax, eax
je 0x1000d4ae
mov edx, dword [ebp + 0x10]
and edx, 0xff
test edx, edx
jne 0x1000d4ae
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
push ecx
mov ecx, dword [ebp - 0x10]
add ecx, 0x1c
call fcn.1000e610
mov dword [ebp - 0xc], eax
mov dl, byte [ebp + 0xc]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.1000d2b1
mov esp, ebp
pop ebp
ret 0xc
Function at 0x100205c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ebp + 0xc], 1
jne 0x100206bb
mov eax, dword [ebp + 8]
mov dword [0x10047dec], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push 0x40
push 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 4
push 0
push dword [ebp + 8]
call fcn.10028270
add esp, 0xc
push 0
push dword [ebp - 0x10]
push 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 8], ecx
lea eax, [ebp - 0x10]
push eax
push 0x40
push 4
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 8]
and dword [eax], 0
push 0
push dword [ebp - 0x10]
push 4
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0xff
push 0x10047c54
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x10047c54
call fcn.100286f0
pop ecx
add eax, 0x10047c54
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x10047c54
jb 0x10020684
mov eax, dword [ebp - 0xc]
movsx eax, byte [eax]
cmp eax, 0x5c
je 0x10020684
mov eax, dword [ebp - 0xc]
dec eax
mov dword [ebp - 0xc], eax
jmp 0x10020667
mov eax, dword [ebp - 0xc]
and byte [eax + 1], 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
push 0
push 0x10047de0
push 0x1002050c
push 0x10002830
push 0x10002840
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call fcn.100070d0
add esp, 0x18
push 1
pop eax
leave
ret 0xc
Function at 0x1002ea77
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x100030d0
cmp edx, dword [eax]
je 0x1002ea99
add eax, 8
inc ecx
cmp eax, 0x10003160
jl 0x1002ea8a
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x100030d0]
jne 0x1002ebc7
mov eax, dword [0x10048e84]
cmp eax, 1
je 0x1002eba1
test eax, eax
jne 0x1002eaca
cmp dword [0x10048e88], 1
je 0x1002eba1
cmp edx, 0xfc
je 0x1002ebc7
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1002eb01
lea eax, [ebp - 0x1a4]
push 0x100051fc
push eax
call fcn.100276c0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.100286f0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x1002eb44
lea eax, [ebp - 0x1a4]
push eax
call fcn.100286f0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x100051f8
push edi
call fcn.10029310
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x100051dc
push eax
call fcn.100276c0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.100276d0
lea eax, [ebp - 0xa0]
push 0x100051d8
push eax
call fcn.100276d0
push dword [esi + 0x100030d4]
lea eax, [ebp - 0xa0]
push eax
call fcn.100276d0
push 0x12010
lea eax, [ebp - 0xa0]
push 0x100051b0
push eax
call fcn.10030bce
add esp, 0x2c
pop edi
jmp 0x1002ebc7
lea eax, [ebp + 8]
lea esi, [esi + 0x100030d4]
push 0
push eax
push dword [esi]
call fcn.100286f0
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]
pop esi
leave
ret
Function at 0x10001000
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x100a7070]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10001041
cmp byte [ebp - 0x194], 2
jne 0x1000103b
cmp byte [ebp - 0x193], 2
je 0x10001044
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1004450b
leave
ret

Function at 0x10008cf2
Capabilities:
Receive data
Receive data on socket

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x10008d21
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x10008e42
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x10008e62
push dword [esi + 0xf4]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x10008e9b
cmp eax, 2
jg 0x10008e9b
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x10089430
push 2
push eax
call fcn.1006d968
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.1006d968
add esp, 0x20
xor eax, eax
ret

Function at 0x10009061
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x12c]
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
and dword [edi], 0
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x100090d3
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x100090ad
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x100090d2
push ebx
push esi
call fcn.10012212
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.10008fcd
mov eax, dword [esi]
mov dword [eax + 0x855c], ebx
add esp, 0x14
mov dword [edi], 0x37
pop ebx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret
Function at 0x10009782
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x100a7070]
xor eax, ebp
mov dword [ebp + 0x8c], eax
push ebx
push esi
mov esi, dword [ebp + 0x98]
cmp dword [esi + 0x198], 0
mov ebx, dword [esi]
push edi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], ebx
jne 0x1000989f
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x9c]
mov edi, 0x80
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x100097ff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.10012212
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.10008fcd
add esp, 0x18
jmp 0x100098a6
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x9c]
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10009832
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.10012212
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x100097f1
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.10009749
test eax, eax
jne 0x10009867
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.10012212
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x100097f2
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.10009749
test eax, eax
jne 0x1000989c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.10012212
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x10009862
mov esi, dword [ebp - 0x78]
push esi
call fcn.100096fa
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1004450b
add ebp, 0x90
leave
ret

Function at 0x100098be
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x308]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x10009903
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.10012212
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.10008f5a
add esp, 0x14
jmp 0x10009910
push str.TCP_NODELAY_set_n
push esi
call fcn.10008f5a
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x10009d67
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x520]
cmp eax, 0xffffffff
push esi
je 0x10009dba
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x10009dba
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x10009d94
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x10009dba
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x10009dba
mov eax, esi
jmp 0x10009dbd
or eax, 0xffffffff
pop esi
pop ebp
ret