joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406270
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x406295
mov eax, dword [0x40a8a8]
cmp eax, 0xffffffff
je 0x40628c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40a8a8], 0xffffffff
jmp 0x406308
cmp dword [0x424a60], ebx
je 0x406308
cmp byte [0x424660], bl
je 0x4062d4
cmp dword [0x40a8a8], 0xffffffff
jne 0x4062dd
push 4
push 0x40000000
push 0x424660
call fcn.00405c50
cmp eax, 0xffffffff
mov dword [0x40a8a8], eax
je 0x406308
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40a8a8], 0xffffffff
je 0x406308
push esi
mov esi, 0x425280
push 0x40aaf0
push esi
call sub.KERNEL32.dll_lstrcatA
lea eax, [ebp + 8]
push ebx
push eax
push esi
call sub.KERNEL32.dll_lstrlenA
push eax
push esi
push dword [0x40a8a8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
pop ebp
ret 4

Function at 0x4064b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42425c], 0
push esi
jne 0x4064e7
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x4064c1
mov dword [ecx*4 + 0x424258], eax
inc ecx
cmp ecx, 0x100
jl 0x4064bc
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406518
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x424258]
xor eax, esi
inc ecx
dec edx
jne 0x4064fa
pop edi
not eax
pop esi
ret 0xc
Function at 0x406de0
Capabilities:
Hide graphical window

Disassembly:
push 0
mov eax, dword [0x40a930]
push eax
call sub.user32.dll_ShowWindow
push 0xffffffffffffffec
mov eax, dword [0x40a930]
push eax
call sub.user32.dll_GetWindowLongA
or eax, 0x80
push eax
push 0xffffffffffffffec
mov eax, dword [0x40a930]
push eax
call sub.user32.dll_SetWindowLongA
push 5
mov eax, dword [0x40a930]
push eax
call sub.user32.dll_ShowWindow
ret

Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43000c
nop
nop
nop
nop
pop eax
nop
add eax, 0x403d7a
nop
nop
sub eax, 0x403d20
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
jl 0x430030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
popal
nop
jmp fcn.00401219
Function at 0x401af0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2a14
call fcn.0041ec10
mov eax, dword [0x43b230]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [section.shared], 0
push esi
mov esi, dword [ebp + 0xc]
jne 0x401b26
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041ead1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2a14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x2a06]
movzx edx, word [ebp - 0x2a08]
movzx eax, word [ebp - 0x2a0a]
push ecx
movzx ecx, word [ebp - 0x2a0c]
push edx
movzx edx, word [ebp - 0x2a0e]
push eax
movzx eax, word [ebp - 0x2a12]
push ecx
movzx ecx, word [ebp - 0x2a14]
push edx
push eax
push ecx
push str._d__02d__02d__02d:_02d:_02d__d
lea edx, [ebp - 0x204]
push pe_nt_image_headers32
push edx
call fcn.0041eb64
mov eax, dword [ebp + 8]
add esp, 0x28
cmp eax, 5
ja case.default.0x401b90
jmp dword [eax*4 + 0x401c98]
mov eax, dword [str.FATAL]
mov cx, word [0x432410]
mov dword [ebp - 0x104], eax
mov word [ebp - 0x100], cx
jmp 0x401c51
mov edx, dword [str.NOTICE]
mov ax, word [0x432408]
mov cl, byte [0x43240a]
mov dword [ebp - 0x104], edx
mov word [ebp - 0x100], ax
mov byte [ebp - 0xfe], cl
jmp 0x401c51
mov edx, dword [str.ERROR]
mov ax, word [0x432400]
mov dword [ebp - 0x104], edx
mov word [ebp - 0x100], ax
jmp 0x401c51
mov ecx, dword [str.WARNING]
mov edx, dword [0x4323f8]
jmp 0x401c45
mov eax, dword [str.DEBUG]
mov cx, word [0x4323f0]
mov dword [ebp - 0x104], eax
mov word [ebp - 0x100], cx
jmp 0x401c51
mov edx, dword [str.INFO]
mov al, byte [0x4323e8]
mov dword [ebp - 0x104], edx
mov byte [ebp - 0x100], al
jmp 0x401c51
mov ecx, dword [str.UNKNOWN]
mov edx, dword [0x4323e0]
mov dword [ebp - 0x100], edx
mov dword [ebp - 0x104], ecx
push esi
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x204]
push ecx
push str._s__s___s_n
lea edx, [ebp - 0x2a04]
push 0x2800
push edx
call fcn.0041eb64
add esp, 0x18
lea eax, [ebp - 0x2a04]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0041ead1
mov esp, ebp
pop ebp
ret

Function at 0x401d40
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x401d8f
mov edx, dword [ebp + 8]
mov eax, edx
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401d70
mov ecx, dword [ebp + 0xc]
sub eax, esi
push eax
push edx
mov edx, dword [ebp - 4]
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x401d9d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x401db0
Capabilities:
Delete registry value
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401ddb
mov esi, 1
jmp 0x401df4
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov esi, eax
test esi, esi
je 0x401df4
mov esi, 2
mov eax, dword [ebp - 4]
test eax, eax
je 0x401e02
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401e10
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x43b230]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x210]
push ecx
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x401ed6
push 0x103
push eax
lea edx, [ebp - 0x107]
push edx
mov byte [ebp - 0x108], al
call fcn.0041ede0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x210]
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x214]
push edx
push esi
push edi
push eax
mov dword [ebp - 0x218], 0x104
mov dword [ebp - 0x214], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
test esi, esi
jne 0x401ed6
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push edx
call fcn.0041f0d8
add esp, 8
test eax, eax
je 0x401ed6
or esi, 0xffffffff
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x401ee7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
sete al
pop edi
xor ecx, ebp
pop esi
call fcn.0041ead1
mov esp, ebp
pop ebp
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4030f2
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 0x403250
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa0
push ebx
mov ebx, dword [esp + 0xac]
push esi
mov esi, dword [esp + 0xac]
mov eax, dword [esi + 0x280]
test eax, eax
push edi
je case.default.0x403298
mov eax, dword [esp + 0xc0]
test eax, eax
je case.default.0x403298
mov edx, dword [eax + 0x7c]
test edx, edx
je case.default.0x403298
lea ecx, [ebx - 1]
cmp ecx, 3
mov eax, str.Data
ja case.default.0x403298
jmp dword [ecx*4 + 0x4033b8]
mov eax, str.Header
mov ecx, str.from
jmp 0x4032b5
mov eax, str.Header
mov ecx, 0x4326c4
push edx
push ecx
push eax
push str.__s__s__s_
lea eax, [esp + 0x1c]
push 0xa0
push eax
call fcn.00404e30
lea eax, [esp + 0x24]
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4032d6
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x40333a
mov ecx, dword [esi + 0xec]
push ecx
push edi
lea edx, [esp + 0x14]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x4033ac
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x403368
mov ecx, dword [esi + 0xec]
mov edx, dword [esp + 0xbc]
push ecx
mov ecx, dword [esp + 0xbc]
push edx
push ecx
push ebx
push esi
call eax
add esp, 0x14
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [esi + 0xe8]
push eax
push 1
push 2
push 0x4326a0
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
push ecx
push 1
lea edx, [esp + 0x24]
push edi
push edx
call fcn.0041f994
add esp, 0x20
jmp case.default.0x403298
test ebx, ebx
jl 0x4033aa
cmp ebx, 2
jg 0x4033aa
mov edx, dword [esi + 0xe8]
push edx
push 1
lea eax, [ebx + ebx*2 + 0x4326a0]
push 2
push eax
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
mov edx, dword [esp + 0xcc]
mov eax, dword [esp + 0xc8]
push ecx
push 1
push edx
push eax
call fcn.0041f994
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
Function at 0x40329f
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa0
push ebx
mov ebx, dword [esp + 0xac]
push esi
mov esi, dword [esp + 0xac]
mov eax, dword [esi + 0x280]
test eax, eax
push edi
je case.default.0x403298
mov eax, dword [esp + 0xc0]
test eax, eax
je case.default.0x403298
mov edx, dword [eax + 0x7c]
test edx, edx
je case.default.0x403298
lea ecx, [ebx - 1]
cmp ecx, 3
mov eax, str.Data
ja case.default.0x403298
jmp dword [ecx*4 + 0x4033b8]
mov eax, str.Header
mov ecx, str.from
jmp 0x4032b5
mov eax, str.Header
mov ecx, 0x4326c4
push edx
push ecx
push eax
push str.__s__s__s_
lea eax, [esp + 0x1c]
push 0xa0
push eax
call fcn.00404e30
lea eax, [esp + 0x24]
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4032d6
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x40333a
mov ecx, dword [esi + 0xec]
push ecx
push edi
lea edx, [esp + 0x14]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x4033ac
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x403368
mov ecx, dword [esi + 0xec]
mov edx, dword [esp + 0xbc]
push ecx
mov ecx, dword [esp + 0xbc]
push edx
push ecx
push ebx
push esi
call eax
add esp, 0x14
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [esi + 0xe8]
push eax
push 1
push 2
push 0x4326a0
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
push ecx
push 1
lea edx, [esp + 0x24]
push edi
push edx
call fcn.0041f994
add esp, 0x20
jmp case.default.0x403298
test ebx, ebx
jl 0x4033aa
cmp ebx, 2
jg 0x4033aa
mov edx, dword [esi + 0xe8]
push edx
push 1
lea eax, [ebx + ebx*2 + 0x4326a0]
push 2
push eax
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
mov edx, dword [esp + 0xcc]
mov eax, dword [esp + 0xc8]
push ecx
push 1
push edx
push eax
call fcn.0041f994
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
Function at 0x4032ab
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa0
push ebx
mov ebx, dword [esp + 0xac]
push esi
mov esi, dword [esp + 0xac]
mov eax, dword [esi + 0x280]
test eax, eax
push edi
je case.default.0x403298
mov eax, dword [esp + 0xc0]
test eax, eax
je case.default.0x403298
mov edx, dword [eax + 0x7c]
test edx, edx
je case.default.0x403298
lea ecx, [ebx - 1]
cmp ecx, 3
mov eax, str.Data
ja case.default.0x403298
jmp dword [ecx*4 + 0x4033b8]
mov eax, str.Header
mov ecx, str.from
jmp 0x4032b5
mov eax, str.Header
mov ecx, 0x4326c4
push edx
push ecx
push eax
push str.__s__s__s_
lea eax, [esp + 0x1c]
push 0xa0
push eax
call fcn.00404e30
lea eax, [esp + 0x24]
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4032d6
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x40333a
mov ecx, dword [esi + 0xec]
push ecx
push edi
lea edx, [esp + 0x14]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x4033ac
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x403368
mov ecx, dword [esi + 0xec]
mov edx, dword [esp + 0xbc]
push ecx
mov ecx, dword [esp + 0xbc]
push edx
push ecx
push ebx
push esi
call eax
add esp, 0x14
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [esi + 0xe8]
push eax
push 1
push 2
push 0x4326a0
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
push ecx
push 1
lea edx, [esp + 0x24]
push edi
push edx
call fcn.0041f994
add esp, 0x20
jmp case.default.0x403298
test ebx, ebx
jl 0x4033aa
cmp ebx, 2
jg 0x4033aa
mov edx, dword [esi + 0xe8]
push edx
push 1
lea eax, [ebx + ebx*2 + 0x4326a0]
push 2
push eax
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
mov edx, dword [esp + 0xcc]
mov eax, dword [esp + 0xc8]
push ecx
push 1
push edx
push eax
call fcn.0041f994
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xa0
ret

Function at 0x4033d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x804
push esi
mov esi, dword [esp + 0x80c]
test esi, esi
je 0x403481
mov eax, dword [esi + 0x2cc]
test eax, eax
je 0x403481
mov ecx, dword [esp + 0x810]
lea eax, [esp + 0x814]
push eax
push ecx
lea edx, [esp + 0xc]
push 0x801
push edx
call fcn.00404dd0
lea eax, [esp + 0x14]
add esp, 0x10
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403420
sub eax, edx
push edi
mov edi, eax
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x403454
mov ecx, dword [esi + 0xec]
push ecx
push edi
lea edx, [esp + 0x10]
push edx
push 0
push esi
call eax
add esp, 0x14
pop edi
pop esi
add esp, 0x804
ret
mov eax, dword [esi + 0xe8]
push eax
push 1
push 2
push 0x4326a0
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
push ecx
push 1
lea edx, [esp + 0x20]
push edi
push edx
call fcn.0041f994
add esp, 0x20
pop edi
pop esi
add esp, 0x804
ret
Function at 0x403490
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push ecx
lea ebx, [esi + 0x524]
push 0x4000
push ebx
call fcn.00404dd0
mov eax, dword [esi + 0xf0]
add esp, 0x10
test eax, eax
je 0x4034e6
mov ecx, dword [esi + 0x8550]
test ecx, ecx
jne 0x4034e6
push ebx
push 0x432684
push pe_nt_image_headers32
push eax
call fcn.00404e30
add esp, 0x10
mov dword [esi + 0x8550], 1
mov eax, dword [esi + 0x2cc]
test eax, eax
je 0x403561
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4034f5
sub eax, edx
push edi
mov edi, eax
cmp edi, 0x3fff
jae 0x403519
mov byte [edi + esi + 0x524], 0xa
inc edi
mov byte [edi + esi + 0x524], cl
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x403538
mov edx, dword [esi + 0xec]
push edx
push edi
push ebx
push 0
push esi
call eax
add esp, 0x14
pop edi
pop esi
pop ebx
ret
mov eax, dword [esi + 0xe8]
push eax
push 1
push 2
push 0x4326a0
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
push ecx
push 1
push edi
push ebx
call fcn.0041f994
add esp, 0x20
pop edi
pop esi
pop ebx
ret
Function at 0x403570
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xb0
mov ecx, dword [esp + 0xbc]
push ebx
mov ebx, dword [esp + 0xbc]
push esi
mov esi, dword [ebx]
push edi
lea eax, [esp + 0xcc]
push eax
push ecx
call fcn.00405920
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x18], edi
jne 0x4035b3
pop edi
pop esi
mov eax, 0x1b
pop ebx
add esp, 0xb0
ret
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4035b8
sub eax, edx
mov ecx, eax
mov dword [esp + 0x10], edi
push ebp
mov edx, dword [esp + 0xc4]
mov ebp, dword [ebx + 0x12c]
xor eax, eax
cmp edx, ebp
lea edx, [esp + 0x10]
push edx
sete al
push ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
push ecx
mov dword [esp + 0x1c], 0
push eax
push ebx
call dword [ebx + eax*4 + 0x138]
mov ebp, eax
xor ecx, ecx
add esp, 0x14
cmp ebp, ecx
jge 0x40361e
mov eax, dword [esp + 0x10]
cmp eax, ecx
je 0x403704
cmp eax, 0x51
jne 0x4036fe
xor ebp, ebp
cmp dword [esi + 0x2cc], ecx
mov dword [esp + 0x10], ecx
je 0x4036b3
cmp dword [esi + 0x280], ecx
je 0x403694
mov eax, dword [ebx + 0x7c]
cmp eax, ecx
je 0x403694
push eax
push 0x4326c4
push str.Data
push str.__s__s__s_
lea edx, [esp + 0x30]
push 0xa0
push edx
call fcn.00404e30
lea eax, [esp + 0x38]
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403666
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x4036d0
mov ecx, dword [esi + 0xec]
push ecx
push edi
lea edx, [esp + 0x28]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x4036b3
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x4036b3
mov ecx, dword [esi + 0xec]
mov edx, dword [esp + 0x14]
push ecx
push ebp
push edx
push 4
push esi
call eax
add esp, 0x14
mov ecx, dword [esp + 0x18]
cmp ebp, ecx
mov edi, dword [esp + 0x1c]
je 0x40370c
mov eax, dword [esp + 0x14]
sub ecx, ebp
add eax, ebp
mov dword [esp + 0x14], eax
jmp 0x4035c8
mov eax, dword [esi + 0xe8]
push eax
push 1
push 2
push 0x4326a0
call fcn.0041f994
mov ecx, dword [esi + 0xe8]
push ecx
push 1
lea edx, [esp + 0x38]
push edi
push edx
call fcn.0041f994
add esp, 0x20
jmp 0x403694
mov dword [esp + 0x10], eax
jmp 0x40370c
mov dword [esp + 0x10], 0x37
push edi
call dword [0x43b03c]
mov eax, dword [esp + 0x14]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xb0
ret
Function at 0x403730
Capabilities:
Send data
Send data on socket

Disassembly:
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + eax*4 + 0x128]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x4037b1
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x403784
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.00418c70
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.00403490
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x8554], ebp
pop ebp
mov eax, edi
pop edi
pop esi
mov dword [ebx], 0x37
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x403ea0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x108
push ebx
push ebp
mov ebp, dword [esp + 0x114]
mov eax, dword [ebp + 0x194]
test eax, eax
push esi
push edi
mov edi, dword [ebp]
mov dword [esp + 0x14], edi
jne 0x403fec
mov esi, dword [esp + 0x120]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x403f15
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.00418c70
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.00403490
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x9c]
push eax
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x403f5b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.00418c70
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00403490
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
lea ebx, [ebp + 0xc4]
lea edi, [ebp + 0x96]
lea esi, [esp + 0x18]
call fcn.00403e50
test eax, eax
jne 0x403fa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00418c70
mov ecx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.00403490
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
lea ebx, [ebp + 0xf8]
lea edi, [ebp + 0xc8]
lea esi, [esp + 0x98]
call fcn.00403e50
test eax, eax
jne 0x403fec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00418c70
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.00403490
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
push ebp
call fcn.00403df0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret

Function at 0x404000
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x2fc]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x404043
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00418c70
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004033d0
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004033d0
add esp, 8
pop esi
pop ecx
ret
Function at 0x404060
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x1001
push 0xffff
push esi
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4040a9
mov edx, dword [esp + 4]
cmp edx, dword [esp + 8]
jg 0x4040c1
push 4
lea eax, [esp + 0xc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x405b60
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push ebx
mov ebx, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x20]
mov dword [esi], 0
push eax
mov byte [ebx], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x20], ecx
je 0x405c06
cmp word [ecx + 8], 2
push ebp
push edi
jne 0x405bd9
cmp word [ecx + 0xa], 4
jne 0x405bd9
mov edi, dword [ecx + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x405bd9
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
lea esp, [esp]
mov ecx, dword [eax]
mov edx, dword [esp + 0x20]
push ecx
push edx
push ebx
push ebp
call fcn.00405af0
test eax, eax
mov dword [esi], eax
je 0x405bfa
add edi, 4
lea esi, [eax + 0x1c]
mov eax, dword [edi]
test eax, eax
jne 0x405bb0
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
mov eax, dword [ecx]
push 0x400
push eax
push ebx
call fcn.0041f0f0
add esp, 0xc
pop edi
pop ebp
pop esi
mov byte [ebx + 0x400], 0
xor eax, eax
pop ebx
ret 0x18
pop edi
pop ebp
pop esi
mov eax, 8
pop ebx
ret 0x18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x405c16.11001
jmp dword [eax*4 + 0x405c3c]
pop esi
mov eax, 0x2af9
pop ebx
ret 0x18
pop esi
mov eax, 0x2afa
pop ebx
ret 0x18
pop esi
mov eax, 0x2afb
pop ebx
ret 0x18