joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40cdc0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x110
mov eax, dword [0x751f00]
xor eax, esp
mov dword [esp + 0x10c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x11c]
cmp dword [ebp + 0x8c], 2
push esi
mov esi, dword [ebp]
push edi
mov edi, ecx
mov dword [esp + 0x14], esi
je 0x40cf3f
cmp dword [ebp + 0x2a0], 0
jne 0x40cf38
cmp dword [ebp + 0x310], 0
jne 0x40cf38
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ebx, 0x80
push edi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x40ce57
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push ebp
call fcn.00431bd0
add esp, 4
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
mov eax, esi
call fcn.0040f9d0
add esp, 0xc
jmp 0x40cf3f
push ebx
lea edx, [esp + 0x1c]
push 0
push edx
mov dword [esp + 0x1c], ebx
call fcn.0055e5f0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40cea7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push ebp
call fcn.00431bd0
add esp, 4
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
mov eax, esi
call fcn.0040f9d0
add esp, 0xc
jmp 0x40cf3f
lea eax, [ebp + 0x112]
lea ebx, [ebp + 0x140]
lea edi, [esp + 0x98]
call fcn.0040cd70
test eax, eax
jne 0x40cee7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebp
call fcn.00431bd0
add esp, 4
push eax
push edi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
mov eax, esi
call fcn.0040f9d0
add esp, 0xc
jmp 0x40cf3f
lea edi, [ebp + 0x58]
mov ecx, 0xb
lea esi, [ebp + 0x112]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [ebp + 0x174]
lea eax, [ebp + 0x144]
lea edi, [esp + 0x18]
call fcn.0040cd70
test eax, eax
jne 0x40cf38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebp
call fcn.00431bd0
add esp, 4
push eax
mov eax, dword [esp + 0x18]
push edi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
call fcn.0040f9d0
add esp, 0xc
jmp 0x40cf3f
mov eax, ebp
call fcn.0040cd00
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055e7fd
add esp, 0x110
ret
Function at 0x40d400
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
push edi
push 4
mov edi, eax
mov esi, dword [edi]
lea eax, [esp + 0xc]
push eax
push 1
push 6
push ecx
mov dword [esp + 0x1c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x40d44a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
mov edi, eax
call fcn.00431bd0
add esp, 4
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
mov ecx, esi
call fcn.0040f940
add esp, 8
pop edi
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
mov ecx, esi
call fcn.0040f940
add esp, 4
pop edi
pop esi
pop ecx
ret

Function at 0x40d460
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
mov eax, dword [0x77e3a0]
mov dword [esp + 4], 0x4020
mov dword [esp], 0
mov dword [esp + 8], 4
test eax, eax
jne 0x40d4ab
push 3
call fcn.004310a0
add esp, 4
test eax, eax
je 0x40d49f
mov dword [0x77e3a0], 2
add esp, 0xc
ret
mov dword [0x77e3a0], 1
jmp 0x40d4b0
cmp eax, 2
je 0x40d4f0
lea eax, [esp + 8]
push eax
lea ecx, [esp + 4]
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40d4d8
mov edx, dword [esp]
cmp edx, dword [esp + 4]
jg 0x40d4f0
push 4
lea eax, [esp + 8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
add esp, 0xc
ret
Function at 0x40d9e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
cmp dword [ecx + 0x1e8], 0
je 0x40d9f7
call fcn.00432840
test eax, eax
jne 0x40da18
xor eax, eax
pop ecx
ret
mov eax, dword [ecx + 0x1a0]
cmp eax, 0xffffffff
je 0x40d9f3
push 2
push 1
lea ecx, [esp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x40da18
pop ecx
ret
mov eax, 1
pop ecx
ret

Function at 0x40dba0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x324
push ebx
push ebp
push esi
mov esi, eax
push edi
mov edi, ecx
lea eax, [esi + esi*2 + 0x3f]
mov eax, dword [edi + eax*8]
test eax, eax
je 0x40dbe6
push eax
call fcn.00596810
add esp, 4
test eax, eax
jne 0x40dcf6
lea ecx, [esi + esi*2 + 0x45]
mov eax, dword [edi + ecx*8]
test eax, eax
je 0x40dbe6
push eax
call fcn.00596810
add esp, 4
test eax, eax
jne 0x40dcf6
mov edx, esi
shl edx, 4
cmp dword [edx + edi + 0x1c8], 0
lea eax, [edx + edi + 0x1c8]
je 0x40dc0e
cmp dword [eax + 4], 0
je 0x40dc0e
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 0xc]
ja 0x40dcf6
mov edi, dword [edi + esi*4 + 0x1a0]
cmp edi, 0xffffffff
je 0x40dce9
mov ebp, dword [sym.imp.WS2_32.dll_select]
mov eax, 1
xor ecx, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x124], edi
mov dword [esp + 0x120], eax
mov dword [esp + 0x228], ecx
lea ebx, [edi + 1]
jmp 0x40dc5b
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x228]
xor edx, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
lea edx, [esp + 0x10]
push edx
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x124]
push edx
lea edx, [esp + 0x230]
and ecx, edx
push ecx
neg eax
sbb eax, eax
lea ecx, [esp + 0x24]
and eax, ecx
push eax
push ebx
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x40dcaf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40dc50
cmp dword [0x77e3a4], 0
jne 0x40dcaf
cmp eax, 0x2714
je 0x40dc50
test esi, esi
jl 0x40dce9
je 0x40dce9
lea edx, [esp + 0x18]
push edx
push edi
xor ebx, ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40dccb
mov ebx, 1
lea eax, [esp + 0x120]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40dce0
or ebx, 4
test ebx, ebx
jle 0x40dce9
test bl, 1
jne 0x40dcf6
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x324
ret
Function at 0x40ea20
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push 0x50
push 1
mov edi, eax
call dword [0x75ccd8]
mov esi, eax
xor eax, eax
add esp, 8
mov dword [esp + 0xc], 8
mov dword [edi + 0x4e4], esi
cmp esi, eax
je 0x40ead6
mov dword [edi + 0x4dc], eax
mov dword [edi + 0x4e0], eax
mov dword [edi + 0x4d8], eax
mov dword [edi + 0x4d4], ebx
mov dword [esi], eax
mov eax, dword [esp + 0x18]
push eax
push ebx
push ebp
mov eax, esi
call fcn.0040e790
add esp, 0xc
test eax, eax
je 0x40ead6
mov ecx, dword [edi + 0x4d0]
push ecx
call dword [0x75cccc]
push ebp
call dword [0x75ccd4]
add esp, 8
mov dword [edi + 0x4d0], eax
test eax, eax
je 0x40ead6
push 0
push 0
lea edx, [esi + 0x10]
push edx
push 0x40e890
push 0
push 0
call fcn.00567f65
add esp, 0x18
test eax, eax
je 0x40eac3
cmp eax, 0xffffffff
jne 0x40eac5
xor eax, eax
mov dword [esi], eax
test eax, eax
jne 0x40eaf7
call fcn.0056b048
mov eax, dword [eax]
mov dword [esp + 0xc], eax
add edi, 0x4d0
push edi
call fcn.0040e990
mov ecx, dword [esp + 0x10]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret
pop edi
pop esi
mov eax, 1
pop ebp
pop ecx
ret
Function at 0x40f740
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x32c
push ebx
mov ebx, dword [eax + ecx*4 + 0x1a0]
mov edx, ecx
shl edx, 4
push esi
lea esi, [edx + eax + 0x1c8]
mov edx, dword [esi + 4]
sub edx, dword [esi + 8]
push edi
mov edi, dword [eax + 0x340]
test byte [edi + 0x3c], 3
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edx
je 0x40f8cd
cmp dword [eax + ecx*4 + 0x1b8], 0x40fcd0
jne 0x40f8cd
xor edi, edi
cmp dword [esi], edi
je 0x40f79f
cmp edx, edi
je 0x40f8cd
cmp ebx, 0xffffffff
jne 0x40f7ab
xor eax, eax
jmp 0x40f87f
mov eax, 1
xor ecx, ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x128], eax
mov dword [esp + 0x230], ecx
inc ebx
jmp 0x40f7df
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x230]
xor edi, edi
lea edx, [esp + 0x18]
push edx
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x12c]
push edx
lea edx, [esp + 0x238]
and ecx, edx
push ecx
neg eax
sbb eax, eax
lea ecx, [esp + 0x2c]
and eax, ecx
push eax
push ebx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f835
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40f7d2
cmp dword [0x77e3a4], 0
jne 0x40f835
cmp eax, 0x2714
je 0x40f7d2
test edi, edi
jl 0x40f8cd
mov ebx, dword [esp + 0x14]
jne 0x40f847
xor eax, eax
jmp 0x40f879
lea edx, [esp + 0x20]
push edx
push ebx
xor edi, edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f85d
mov edi, 1
lea eax, [esp + 0x128]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f872
or edi, 4
mov eax, edi
cmp edi, 0xffffffff
je 0x40f8cd
mov edx, dword [esp + 0x10]
xor edi, edi
test al, 1
je 0x40f8cd
cmp dword [esi], edi
jne 0x40f8ad
push 0x8000
mov dword [esi + 4], 0x8000
call dword [0x75ccc8]
mov ecx, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
cmp eax, edi
je 0x40f8ca
mov edx, ecx
push edi
push edx
mov edx, dword [esi]
add edx, dword [esi + 8]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, edi
jle 0x40f8cd
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40fc00
Capabilities:
Send data
Send data on socket

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esi + ecx*4 + 0x1a0]
mov eax, esi
call fcn.0040f740
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [esp + 0x24]
mov ebx, eax
mov dword [ebp], 0
cmp ebx, 0xffffffff
jne 0x40fc87
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0x2733
jne 0x40fc5d
xor eax, eax
mov dword [ebp], 0x51
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.00431bd0
add esp, 4
push eax
mov eax, dword [esi]
push str.Send_failure:__s
call fcn.0040f9d0
mov edx, dword [esi]
mov dword [edx + 0x8700], edi
add esp, 8
mov dword [ebp], 0x37
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4101a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa8
mov eax, dword [0x751f00]
xor eax, esp
mov dword [esp + 0xa4], eax
cmp dword [esi + 0x370], 0
mov eax, dword [esp + 0xb4]
push ebp
mov ebp, dword [esp + 0xb0]
push edi
je case.default.0x4101f0
test eax, eax
je case.default.0x4101f0
mov eax, dword [eax + 0x9c]
test eax, eax
je case.default.0x4101f0
lea edx, [ebx - 1]
mov ecx, str.Data
cmp edx, 3
ja case.default.0x4101f0
jmp dword [edx*4 + 0x41031c]
mov ecx, str.Header
mov edx, str.from
jmp 0x41020d
mov ecx, str.Header
mov edx, 0x71f6dc
push eax
push edx
push ecx
push str.__s__s__s_
lea eax, [esp + 0x18]
push 0xa0
push eax
call fcn.0041e370
lea eax, [esp + 0x20]
add esp, 0x18
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410230
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x41029a
mov ecx, dword [esi + 0x134]
push ecx
push edi
lea edx, [esp + 0x10]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x410305
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x4102c8
mov ecx, dword [esi + 0x134]
mov edx, dword [esp + 0xb8]
push ecx
push edx
push ebp
push ebx
push esi
call eax
add esp, 0x14
pop edi
pop ebp
mov ecx, dword [esp + 0xa4]
xor ecx, esp
call fcn.0055e7fd
add esp, 0xa8
ret
mov eax, dword [esi + 0x130]
push eax
push 1
push 2
push 0x71e4cc
call fcn.005611ab
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [esp + 0x20]
push edi
push edx
call fcn.005611ab
add esp, 0x20
jmp case.default.0x4101f0
test ebx, ebx
jl 0x410303
cmp ebx, 2
jg 0x410303
mov eax, dword [esi + 0x130]
push eax
push 1
lea ecx, [ebx + ebx*2 + 0x71e4cc]
push 2
push ecx
call fcn.005611ab
mov edx, dword [esi + 0x130]
mov eax, dword [esp + 0xc8]
push edx
push 1
push eax
push ebp
call fcn.005611ab
add esp, 0x20
xor eax, eax
mov ecx, dword [esp + 0xac]
pop edi
pop ebp
xor ecx, esp
call fcn.0055e7fd
add esp, 0xa8
ret
Function at 0x4173b0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, dword [ebp + 8]
imul ecx, ecx, 0x3e8
dec eax
cmp eax, 9
ja case.0x4173e5.8
jmp dword [eax*4 + 0x4174f0]
mov dword [esi + 0x618], edx
mov dword [esi + 0x61c], ecx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x610], edx
mov dword [esi + 0x614], ecx
mov esp, ebp
pop ebp
ret
call fcn.004105c0
mov dword [esi + 0x620], eax
mov dword [esi + 0x624], edx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x614]
push eax
mov eax, dword [esi + 0x610]
push eax
push ecx
push edx
call fcn.00410630
fstp qword [esi + 0x5d8]
add esp, 0x10
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x614]
push eax
mov eax, dword [esi + 0x610]
push eax
push ecx
push edx
call fcn.00410630
fstp qword [esi + 0x5e0]
add esp, 0x10
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x614]
push eax
mov eax, dword [esi + 0x610]
push eax
push ecx
push edx
call fcn.00410630
fstp qword [esi + 0x5e8]
add esp, 0x10
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x614]
push eax
mov eax, dword [esi + 0x610]
push eax
push ecx
push edx
call fcn.00410630
fstp qword [esi + 0x5f0]
add esp, 0x10
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x614]
push eax
mov eax, dword [esi + 0x610]
push eax
push ecx
push edx
call fcn.00410630
fstp qword [esi + 0x5f8]
add esp, 0x10
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x60c]
push eax
mov eax, dword [esi + 0x608]
push eax
push ecx
push edx
call fcn.00410630
fstp qword [esi + 0x600]
add esp, 0x10
mov esp, ebp
pop ebp
ret
Function at 0x41ea00
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x24]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x14], 0
mov dword [eax], 0
lea esp, [esp]
mov ecx, dword [esp + 0x24]
mov ebp, dword [ecx]
mov eax, dword [ebp + 0x1e0]
xor ecx, ecx
xor ebx, ebx
mov edi, 0x493e0
test eax, eax
jle 0x41ea3c
lea ecx, [ebx + 1]
mov edx, dword [ebp + 0x1e4]
test edx, edx
jle 0x41ea49
or ecx, 2
sub ecx, 1
je 0x41ea5e
sub ecx, 1
je 0x41ea5c
sub ecx, 1
jne 0x41ea63
cmp eax, edx
jl 0x41ea5e
mov eax, edx
cdq
mov ebx, edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, dword [ebp + 0x610]
mov esi, edx
mov ebp, dword [ebp + 0x614]
shr esi, 6
mov edx, esi
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
mov dword [esp + 0x18], eax
mov eax, ecx
push 0xffffffffffffffff
sub eax, ebp
cdq
push 0xfffffc18
push edx
push eax
call fcn.0056a120
mov ecx, eax
mov eax, esi
sub eax, dword [esp + 0x18]
mov ebp, edx
imul eax, eax, 0x3e8
cdq
sub ecx, eax
sbb ebp, edx
add edi, ecx
adc ebx, ebp
mov edx, edi
or edx, ebx
je 0x41eb3b
test ebx, ebx
jl 0x41eb3b
jg 0x41ead3
test edi, edi
jb 0x41eb3b
push ebx
push edi
mov edi, dword [esp + 0x30]
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
call fcn.0040ef40
add esp, 0x14
test eax, eax
jle 0x41eb5e
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push 0
push esi
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x41eb20
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x41ea20
mov eax, 0x38
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
cmp esi, eax
je 0x41eb48
test eax, eax
je 0x41eb5e
add dword [esp + 0x2c], eax
sub esi, eax
add dword [esp + 0x14], eax
mov dword [esp + 0x30], esi
jmp 0x41ea20
mov eax, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
add eax, ecx
mov dword [edx], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
Function at 0x4223b0
Capabilities:
Get hostname

Disassembly:
sub esp, 0x408
mov eax, dword [0x751f00]
xor eax, esp
mov dword [esp + 0x404], eax
push esi
mov esi, ecx
mov eax, dword [esi]
mov ecx, dword [eax + 0x87c4]
cmp byte [ecx], 0
jne 0x422416
push 0x401
lea ecx, [esp + 8]
push ecx
mov byte [esp + 0xc], 0
call dword [sym.imp.WS2_32.dll_gethostname]
mov byte [esp + 0x404], 0
test eax, eax
jne 0x422411
lea edx, [esp + 4]
push 0x2e
push edx
call fcn.00562bf0
add esp, 8
test eax, eax
je 0x42240b
mov byte [eax], 0
lea ecx, [esp + 4]
jmp 0x422416
mov ecx, str.localhost
push 1
push 0
add esi, 0x538
push esi
xor eax, eax
call fcn.00427b40
mov ecx, dword [esp + 0x414]
add esp, 0xc
pop esi
xor ecx, esp
call fcn.0055e7fd
add esp, 0x408
ret

Function at 0x4229c0
Capabilities:
Get socket status

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x320
push ebx
push ebp
push esi
push edi
mov edi, dword [ecx + 0x1a0]
mov eax, 1
cmp edi, 0xffffffff
je 0x422acd
mov ebp, dword [sym.imp.WS2_32.dll_select]
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x124], edi
mov dword [esp + 0x120], eax
mov dword [esp + 0x228], ecx
lea ebx, [edi + 1]
jmp 0x422a1d
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x228]
xor edx, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
lea edx, [esp + 0x10]
push edx
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x124]
push edx
lea edx, [esp + 0x230]
and ecx, edx
push ecx
neg eax
sbb eax, eax
lea ecx, [esp + 0x24]
and eax, ecx
push eax
push ebx
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x422a6f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x422a10
cmp dword [0x77e3a4], 0
jne 0x422a6f
cmp eax, 0x2714
je 0x422a10
test esi, esi
jge 0x422a9a
or eax, 0xffffffff
test al, 4
jne 0x422ada
test al, 1
je 0x422ada
mov ecx, dword [esp + 0x334]
call fcn.0040d9e0
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x320
ret
je 0x422acd
lea edx, [esp + 0x18]
push edx
push edi
xor esi, esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422ab2
mov esi, 1
lea eax, [esp + 0x120]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422ac7
or esi, 4
mov eax, esi
test esi, esi
jne 0x422a76
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x320
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x320
ret

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

Disassembly:
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_transmit
push 0x71fa38
call fcn.0040f940
add esp, 8
mov eax, esi
mov dword [esi], 2
call fcn.00423850
test eax, eax
jne 0x423df3
mov ecx, dword [esp + 4]
mov eax, esi
jmp fcn.004244b0
ret

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

Disassembly:
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x71fa38
call fcn.0040f940
add esp, 8
mov eax, esi
mov dword [esi], 1
call fcn.00423850
test eax, eax
jne 0x423e2f
mov eax, esi
jmp fcn.004241f0
ret
Function at 0x424ba0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x90
mov eax, dword [0x751f00]
xor eax, esp
mov dword [esp + 0x8c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x9c]
push esi
mov esi, dword [ebp]
push edi
mov edi, dword [ebp + 0x4f8]
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0x80
mov edx, dword [edi + 0x154]
mov eax, dword [edi + 0x15c]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [edi + 0x14]
push 0
add edx, 4
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x148], 0
mov dword [edi + 0x14c], eax
jne 0x424c29
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [edi + 0xc8]
push ecx
call fcn.0055f610
mov edx, dword [esp + 0x20]
add esp, 0xc
mov dword [edi + 0x148], edx
mov ecx, dword [edi + 0x14c]
cmp ecx, 4
jge 0x424c65
push str.Received_too_short_packet
mov eax, esi
call fcn.0040f9d0
add esp, 4
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x9c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055e7fd
add esp, 0x90
ret
mov edx, dword [edi + 0x15c]
movzx ax, byte [edx]
movzx edx, byte [edx + 1]
shl ax, 8
movzx eax, ax
or eax, edx
mov dword [edi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x424c8b
jmp dword [eax*4 + 0x424da4]
cmp ecx, 4
jle case.0x424c8b.4
mov eax, dword [edi + 0x15c]
movzx dx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl dx, 8
movzx edx, dx
or edx, eax
movzx eax, word [edi + 0x40]
inc eax
and eax, 0xffff
cmp eax, edx
jne case.0x424c8b.4
mov eax, dword [edi + 0x15c]
push 1
add ecx, 0xfffffffc
add eax, 4
push ebp
call fcn.0040ffc0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x424cf5
mov ecx, 5
mov eax, edi
call fcn.00424910
mov eax, ebx
jmp 0x424c4c
mov eax, dword [edi + 0x14c]
sub eax, 4
cdq
add dword [esi + 0x70], eax
adc dword [esi + 0x74], edx
mov ecx, dword [esi + 0x74]
mov edx, dword [esi + 0x70]
push ecx
push edx
call fcn.00417620
jmp 0x424d78
mov eax, dword [edi + 0x15c]
movzx cx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl cx, 8
movzx edx, cx
mov ecx, dword [edi + 0x15c]
add ecx, 4
push ecx
or edx, eax
push 0x71fa38
mov ecx, esi
mov dword [edi + 8], edx
call fcn.0040f940
jmp 0x424d78
mov edx, dword [edi + 0x15c]
add ecx, 0xfffffffe
push ecx
add edx, 2
push edx
push edi
call fcn.00423ad0
add esp, 0xc
test eax, eax
je case.0x424c8b.4
jmp 0x424c4c
push str.Internal_error:_Unexpected_packet
push 0x71f628
mov eax, esi
call fcn.0040f9d0
add esp, 8
push ebp
call fcn.00417820
add esp, 4
test eax, eax
je 0x424c4a
mov ecx, 5
mov eax, edi
call fcn.00424910
mov eax, 0x2a
jmp 0x424c4c