joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402f90
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push 4
lea eax, [ebp - 4]
push eax
push 4
push str.checkupdate
push str.SoftwareAdbyby
push reloc.WS2_32.dll_accept
mov dword [ebp - 4], 0
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
cmp dword [0x4c5ccc], 0
jne 0x402fdd
push str.NTDLL.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.NtQuerySystemInformation
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4c5ccc], eax
push 0xa
push 0x4c5b00
push 0x592d17a
call fcn.00475bdd
add esp, 0xc
mov esp, ebp
pop ebp
ret

Function at 0x403000
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x10b]
push 0
push eax
mov byte [ebp - 0x10c], 0
call fcn.00463ac0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x10c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x10c]
push 0x5c
push edx
call fcn.0045e830
mov byte [eax], 0
lea eax, [ebp - 0x10c]
add esp, 8
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403060
mov ecx, dword [str._adhook.ini]
mov edx, dword [0x4ab8f8]
mov dword [eax], ecx
mov ecx, dword [0x4ab8fc]
mov dword [eax + 4], edx
lea edx, [ebp - 0x10c]
push edx
push 0x104
mov dword [eax + 8], ecx
lea eax, [ebp - 0x214]
push eax
push 0x4ab595
push str.whitehost
push str.filter
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, dword [0x4c5d5c]
mov ecx, dword [0x4c5d60]
cmp eax, ecx
je 0x4030e0
mov edx, dword [ebp - 0x234]
push esi
push edi
push edx
push ecx
call fcn.00406890
mov edi, dword [0x4c5d60]
add esp, 8
mov esi, eax
call fcn.00405a10
pop edi
mov dword [0x4c5d60], esi
pop esi
lea eax, [ebp - 0x214]
mov dword [ebp - 0x21c], 0xf
mov dword [ebp - 0x220], 0
mov byte [ebp - 0x230], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403104
sub eax, edx
push eax
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp - 0x230]
call fcn.00405560
lea ecx, [ebp - 0x230]
push 0x2c
push ecx
mov ecx, 0x4c5d5c
call fcn.0042b800
add esp, 8
cmp dword [ebp - 0x21c], 0x10
jb 0x40314e
mov edx, dword [ebp - 0x230]
push edx
call fcn.0045d63f
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret

Function at 0x403640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [0x4c5b18]
test edx, edx
je 0x403672
xor ecx, ecx
movzx eax, byte [ecx + edx]
xor al, 1
mov byte [ebp - 1], al
mov al, byte [ebp - 1]
ror al, 3
mov byte [ebp - 1], al
movzx eax, byte [ebp - 1]
mov byte [ecx + edx], al
inc ecx
cmp ecx, 0x8f3
jb 0x403650
mov esp, ebp
pop ebp
ret
Function at 0x4041b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x4c5c94], 0
mov eax, dword [ebp + 8]
push edi
mov edi, ecx
je 0x40428b
cmp dword [0x4c5b28], 0
push esi
je 0x40425b
lea esi, [ebp - 0x20]
call fcn.00403e80
cmp dword [ebp - 0xc], 0x10
mov esi, dword [ebp - 0x20]
jae 0x4041f1
lea esi, [ebp - 0x20]
mov eax, dword [0x4c5b28]
push ebx
mov ebx, eax
mov eax, dword [eax + 8]
add eax, 0x78
test esi, esi
jne 0x404207
xor ecx, ecx
jmp 0x404219
mov ecx, esi
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x404210
sub ecx, edi
push esi
mov edi, ecx
call fcn.0041fac0
mov eax, dword [ebx]
push 0
push 0x1388
push 0x4d3
push eax
call dword [sym.imp.USER32.dll_SetTimer]
cmp dword [ebp - 0xc], 0x10
pop ebx
jb 0x40428a
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0045d63f
add esp, 4
pop esi
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
inc eax
push eax
call fcn.0045db21
mov esi, eax
add esp, 4
mov ecx, edi
sub esi, edi
jmp 0x404270
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x404270
push eax
push 0
push 0x403ec0
call fcn.0045dd34
add esp, 0xc
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop edi
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
Function at 0x4046e0
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4ab9d0]
mov ecx, dword [0x4ab9d4]
mov edx, dword [0x4ab9d8]
push esi
push edi
mov dword [0x4c5b30], eax
mov al, byte [0x4ab9dc]
mov dword [0x4c5b34], ecx
mov dword [0x4c5b38], edx
mov byte [0x4c5b3c], al
mov ecx, 5
mov esi, str.http:__www.adbyby.com_
mov edi, 0x4c5b95
rep movsd dword es:[edi], dword [esi]
push 0x64
movsw word es:[edi], word [esi]
lea ecx, [ebp - 0x6c]
push ecx
push 0
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x6c]
push 0x5c
push edx
call fcn.0045e830
mov byte [eax], 0
lea eax, [ebp - 0x6c]
add esp, 8
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404755
mov ecx, dword [str.oem.dat]
mov edx, dword [0x4aba94]
mov dword [eax], ecx
mov cl, byte [0x4aba98]
mov dword [eax + 4], edx
lea edx, [ebp - 0x6c]
push 0x4aba9c
push edx
mov byte [eax + 8], cl
call fcn.0045e59d
mov esi, eax
add esp, 8
test esi, esi
je 0x4048e6
push 2
push 0
push esi
call fcn.0045eae0
push esi
call fcn.0045e9f1
push 0
push 0
push esi
mov edi, eax
call fcn.0045eae0
add esp, 0x1c
push esi
cmp edi, 0x12f
je 0x4047d2
call fcn.0045ec1a
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
push 1
push 0x12f
push 0x4c5b30
call fcn.0045e809
push esi
call fcn.0045ec1a
mov esi, 1
mov edi, 2
add esp, 0x14
xor ecx, ecx
sub esi, 0x4c5b30
sub edi, 0x4c5b30
mov eax, 0x38e38e39
mul ecx
shr edx, 1
lea eax, [edx + edx*8]
mov edx, ecx
sub edx, eax
movzx eax, byte [edx + 0x4c1b50]
xor byte [ecx + 0x4c5b30], al
lea edx, [esi + ecx + 0x4c5b30]
mov eax, 0x38e38e39
mul edx
shr edx, 1
lea eax, [edx + edx*8]
mov edx, ecx
sub edx, eax
movzx eax, byte [edx + 0x4c1b51]
xor byte [ecx + 0x4c5b31], al
lea edx, [edi + ecx + 0x4c5b30]
mov eax, 0x38e38e39
mul edx
shr edx, 1
lea eax, [edx + edx*8]
mov edx, ecx
sub edx, eax
movzx eax, byte [edx + 0x4c1b52]
xor byte [ecx + 0x4c5b32], al
add ecx, 3
cmp ecx, 0x12f
jb 0x404804
mov eax, 0x4c5b30
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404880
sub eax, edx
cmp eax, 4
jae 0x4048bc
mov ecx, dword [0x4ab9d0]
mov edx, dword [0x4ab9d4]
mov eax, dword [0x4ab9d8]
mov dword [0x4c5b30], ecx
mov cl, byte [0x4ab9dc]
mov dword [0x4c5b34], edx
mov dword [0x4c5b38], eax
mov byte [0x4c5b3c], cl
mov eax, 0x4c5b95
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4048c4
sub eax, edx
cmp eax, 8
jae 0x4048e6
mov ecx, 5
mov esi, str.http:__www.adbyby.com_
mov edi, 0x4c5b95
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
Function at 0x4088a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x4aba9c
push edi
mov dword [ebp - 4], 0
call fcn.0045e59d
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4088e2
push edi
push str.Failed_to_open__s:__E
push 0x2000
call fcn.004090c0
add esp, 0xc
lea eax, [ebx + 3]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push ebx
call fcn.0045eae0
add esp, 0xc
test eax, eax
je 0x408906
push edi
push str.Unexpected_error_while_fseek__ing_to_the_end_of__s:__E
push 0x4000
call fcn.004090c0
add esp, 0xc
push ebx
call fcn.0045e9f1
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
jne 0x408929
push edi
push str.Unexpected_ftell___error_while_loading__s:__E
push 0x4000
call fcn.004090c0
add esp, 0xc
mov edi, dword [ebp + 0x10]
push 0
push 0
push ebx
mov dword [edi], esi
call fcn.0045eae0
add esp, 0xc
test eax, eax
je 0x408955
mov eax, dword [ebp + 8]
push eax
push str.Unexpected_error_while_fseek__ing_to_the_beginning_of__s:__E
push 0x4000
call fcn.004090c0
add esp, 0xc
mov esi, dword [edi]
inc esi
push esi
call fcn.0045db21
mov edi, eax
add esp, 4
test edi, edi
je 0x408973
push esi
push 0
push edi
call fcn.00463ac0
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edi
test edi, edi
jne 0x408996
push ebx
mov dword [ebp - 4], 1
call fcn.0045ec1a
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push ebx
push 1
push eax
push edi
call fcn.0045e809
add esp, 0x10
test eax, eax
jne 0x4089c9
mov ecx, dword [ebp + 8]
push ecx
push str.Couldnt_completely_read_file__s.
push 0x2000
call fcn.004090c0
add esp, 0xc
mov dword [ebp - 4], 3
push ebx
call fcn.0045ec1a
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409910
Capabilities:
Create process memory minidump
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4b4330
push 0x464790
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4b9430]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 0xc]
xor edi, edi
cmp esi, edi
jne 0x4099b1
mov dword [ebp - 4], edi
push str.raising_exception_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push edi
push edi
push reloc.WS2_32.dll_closesocket
call dword [sym.imp.KERNEL32.dll_RaiseException]
push str.writing_minidump_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
push edi
push edi
lea edx, [ebp - 0x24]
push edx
push edi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.dbghelp.dll_MiniDumpWriteDump]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40bf40
Capabilities:
Read file on windows

Disassembly:
cmp dword [eax + 0x14], 0x10
push ebx
push esi
push edi
mov esi, ecx
jb 0x40bf4d
mov eax, dword [eax]
push 0x4aba9c
push eax
call fcn.0045e59d
mov edi, eax
add esp, 8
test edi, edi
je 0x40bfa4
push 2
push 0
push edi
call fcn.0045eae0
push edi
call fcn.0045e9f1
add esp, 0x10
mov ebx, eax
call fcn.0040c050
test ebx, ebx
je 0x40bfa4
push 0
push 0
push edi
call fcn.0045eae0
mov eax, dword [esi]
push edi
push 1
push ebx
push eax
call fcn.0045e809
push edi
call fcn.0045ec1a
add esp, 0x20
pop edi
pop esi
mov al, 1
pop ebx
ret
pop edi
pop esi
xor al, al
pop ebx
ret
Function at 0x40ca40
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 8], eax
xor eax, eax
push ebx
push esi
mov dword [ebp - 0x160], eax
mov dword [ebp - 0x15c], eax
mov dword [ebp - 0x158], eax
push edi
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 8]
push eax
mov esi, ecx
lea ecx, [ebp - 0x28]
push 0x4ac714
mov ebx, 1
push ecx
mov dword [ebp - 0x160], 0x17
mov dword [ebp - 0x15c], ebx
mov dword [ebp - 0x158], 6
call fcn.0045fdbb
add esp, 0xc
lea edx, [ebp - 0x138]
push edx
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x28]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
js 0x40cb9f
mov eax, dword [ebp - 0x138]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40cb9f
push 4
lea eax, [ebp - 0x13c]
push eax
push ebx
push 6
push edi
mov dword [ebp - 0x13c], ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp - 0x138]
mov esi, eax
test eax, eax
je 0x40cb51
mov ebx, dword [sym.imp.WS2_32.dll_connect]
lea ecx, [ecx]
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x18]
push ecx
push edx
push edi
call ebx
test eax, eax
je 0x40cb46
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40cb30
mov eax, dword [ebp - 0x138]
mov ebx, 1
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
lea eax, [ebp - 0x144]
push eax
push 0
lea ecx, [ebp - 0x134]
push ecx
push 0
lea edx, [edi + 1]
push edx
mov dword [ebp - 0x130], edi
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x144], 0x1e
mov dword [ebp - 0x140], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x40cbb3
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x40cb9f
mov ecx, dword [ebp - 8]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
Function at 0x40cbd0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x114]
push edi
test eax, eax
je 0x40cc05
push eax
call fcn.0045d483
add esp, 4
mov dword [esi + 0x114], 0
xor eax, eax
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x114], eax
mov eax, dword [esi + 0xe4]
test eax, eax
je 0x40cd64
push eax
call fcn.0041d210
mov edi, eax
test edi, edi
je 0x40cd64
movzx eax, word [edi + 0xc]
mov ebx, dword [sym.imp.WS2_32.dll_htons]
push eax
call ebx
movzx ecx, ax
mov eax, dword [edi + 8]
cmp eax, 0xffffffff
je 0x40cd64
mov edx, 2
push ecx
mov dword [ebp - 0x11c], eax
mov word [ebp - 0x120], dx
call ebx
mov word [ebp - 0x11e], ax
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call fcn.004734c7
movzx ecx, word [ebp - 0x120]
add esp, 4
push 0
mov ebx, 1
push ebx
push ecx
mov dword [esi + 0x114], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40cd64
push 4
lea edx, [ebp - 0x124]
push edx
push ebx
push 6
push esi
mov dword [ebp - 0x124], ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, dword [sym.imp.WS2_32.dll_connect]
push 0x10
lea eax, [ebp - 0x120]
push eax
push esi
call edi
cmp eax, 0xffffffff
jne 0x40cd0a
call fcn.00460a98
cmp dword [eax], 0x2734
je 0x40cd0a
call fcn.00460a98
cmp dword [eax], 4
jne 0x40cd5d
push 0x10
lea ecx, [ebp - 0x120]
push ecx
push esi
call edi
cmp eax, 0xffffffff
je 0x40cce2
lea edx, [ebp - 0x12c]
push edx
push 0
lea eax, [ebp - 0x110]
push eax
push 0
lea ecx, [esi + 1]
push ecx
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x12c], 0x1e
mov dword [ebp - 0x128], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x40cd5d
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret

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

Disassembly:
push edi
push esi
push ebx
push str.to_socket__d:__N
push 0x10
call fcn.004090c0
add esp, 0x14
push 0
push esi
push edi
push ebx
call dword [sym.imp.WS2_32.dll_send]
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
ret

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

Disassembly:
push esi
push 0
push eax
push edi
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jle 0x40cdd9
push edi
push esi
push ebx
push str.from_socket__d:__N
push 0x8000
call fcn.004090c0
add esp, 0x14
mov eax, esi
pop esi
ret
Function at 0x40cde0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 8], eax
xor eax, eax
lea ecx, [ebp - 0x124]
push ecx
mov dword [ebp - 0x124], eax
push 0
mov dword [ebp - 0x120], eax
mov eax, dword [ebp + 8]
push 0
lea edx, [ebp - 0x11c]
mov dword [ebp - 0x124], eax
push edx
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x11c], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jne 0x40ce5c
push 2
push eax
lea ecx, [ebp - 0x14]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 1
jne 0x40ce5c
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
xor ecx, ebp
xor eax, eax
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret

Function at 0x40ce70
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
call fcn.0040d680
test eax, eax
je 0x40cf9e
mov ebx, dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x314], 0
jmp 0x40ceb0
xor eax, eax
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x318], eax
mov dword [ebp - 0x31c], eax
lea eax, [ebp - 0x31c]
push eax
push 0
push 0
lea ecx, [ebp - 0x310]
push ecx
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x30c], esi
mov dword [ebp - 0x310], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jne 0x40cf83
push 2
push eax
lea edx, [ebp - 0x10]
push edx
push esi
call ebx
cmp eax, 1
jne 0x40cf83
push 0
push 0x1f4
lea eax, [ebp - 0x208]
push eax
push esi
call ebx
mov edi, eax
test edi, edi
jle 0x40cf3c
lea ecx, [ebp - 0x208]
push ecx
push edi
push esi
push str.from_socket__d:__N
push 0x8000
call fcn.004090c0
add esp, 0x14
test edi, edi
jns 0x40cf50
push esi
push str.Failed_to_drain_socket__d:__E
push 2
call fcn.004090c0
add esp, 0xc
jmp 0x40cf69
test edi, edi
jle 0x40cf83
mov eax, dword [ebp - 0x314]
add eax, edi
mov dword [ebp - 0x314], eax
cmp eax, 0x2710
jg 0x40cf73
test edi, edi
jg 0x40ceb0
jmp 0x40cf83
push esi
push str.Giving_up_draining_socket__d
push 2
call fcn.004090c0
add esp, 0xc
mov eax, dword [ebp - 0x314]
test eax, eax
je 0x40cf9e
push esi
push eax
push str.Drained__d_bytes_before_closing_socket__d
push 2
call fcn.004090c0
add esp, 0x10
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
Function at 0x40cfc0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 8], eax
xor eax, eax
push esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
push edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
push eax
mov esi, ecx
lea ecx, [ebp - 0x28]
push 0x4ac714
push ecx
mov dword [ebx], 0xffffffff
mov dword [ebp - 0x44], 1
mov dword [ebp - 0x40], 6
call fcn.0045fdbb
add esp, 0xc
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x28]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40d044
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d031
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40d031
mov edi, dword [sym.imp.WS2_32.dll_listen]
push 0x200
push esi
call edi
cmp eax, 0xffffffff
jne 0x40d0a7
lea ebx, [ebx]
call fcn.00460a98
cmp dword [eax], 4
jne 0x40d031
push 0x200
push esi
call edi
cmp eax, 0xffffffff
je 0x40d090
mov ecx, dword [ebp - 8]
pop edi
mov dword [ebx], esi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
Function at 0x40d0c0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x18], eax
push esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
push edi
mov eax, 2
mov edi, ecx
mov dword [ebx], 0xffffffff
mov word [ebp - 0x18], ax
call fcn.0040d5a0
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x40d113
mov eax, 0xfffffffe
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 1
push 2
mov word [ebp - 0x16], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d183
push 0x10
lea edx, [ebp - 0x18]
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x40d196
call fcn.00460a98
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
call fcn.00460a98
cmp dword [eax], 0x2740
push esi
jne 0x40d17d
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffd
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_listen]
push 0x200
push esi
call edi
cmp eax, 0xffffffff
jne 0x40d1c7
lea esp, [esp]
call fcn.00460a98
cmp dword [eax], 4
jne 0x40d183
push 0x200
push esi
call edi
cmp eax, 0xffffffff
je 0x40d1b0
mov ecx, dword [ebp - 8]
pop edi
mov dword [ebx], esi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
Function at 0x40d1e0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x4b9430]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
mov dword [ebp - 0x18], 0x10
test esi, esi
je 0x40d204
mov dword [esi], 0
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
push ecx
mov dword [ebx], 0
push edx
mov dword [edi], 0
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40d310
cmp dword [ebp - 0x18], 0x10
jle 0x40d24e
push str.getsockname___truncated_server_address
push 0x2000
call fcn.004090c0
add esp, 8
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
push 0x20
call fcn.0045db21
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x40d27f
push str.Out_of_memory_while_getting_the_clients_port.
push 0x2000
call fcn.004090c0
add esp, 8
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call fcn.004734c7
mov ecx, dword [ebp - 0x12]
add esp, 4
push ecx
mov dword [ebx], eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
mov eax, dword [edi]
push edx
push 0x4ad978
push 0x20
push eax
call fcn.0041c480
add esp, 0x10
test esi, esi
je 0x40d310
push 0x4c71c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 2
push 4
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
push 0x4c71c0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x40d303
push str.Unable_to_get_my_own_hostname:__E_n
push 0x2000
call fcn.004090c0
add esp, 8
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
push edx
call fcn.004734c7
add esp, 4
mov dword [esi], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.0045d3b4
mov esp, ebp
pop ebp
ret