joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402200
Capabilities:
Delete file

Disassembly:
sub esp, 0x130
mov eax, dword [0x47deb4]
xor eax, esp
mov dword [esp + 0x12c], eax
push ebp
mov ebp, dword [esp + 0x13c]
push esi
mov esi, dword [esp + 0x13c]
push edi
push 0x468854
push ebp
call fcn.00407630
mov edi, eax
add esp, 8
test edi, edi
je 0x402250
push esi
push edi
call fcn.00405560
add esp, 8
test eax, eax
je 0x40226a
push edi
call fcn.004076c0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x12c]
xor ecx, esp
call fcn.0041465a
add esp, 0x130
ret
lea eax, [esp + 0xc]
push eax
push 0xffffffffffffffff
push edi
call fcn.00405510
add esp, 0xc
test eax, eax
jne 0x402247
push ebx
mov ebx, dword [esp + 0x10]
xor esi, esi
test ebx, ebx
jle 0x4022b0
lea esp, [esp]
lea ecx, [esp + 0x10]
push ecx
push esi
push edi
call fcn.00405510
lea edx, [esp + 0x20]
push edx
push esi
push edi
call fcn.004076a0
inc esi
add esp, 0x18
cmp esi, ebx
jl 0x402290
push edi
call fcn.004076c0
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x13c]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 1
call fcn.0041465a
add esp, 0x130
ret

Function at 0x402510
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, dword [esp + 8]
sub esp, 8
push esi
push edi
push 0x468954
push eax
lea ecx, [esp + 0x10]
push ecx
call fcn.00414744
mov edx, dword [esp + 0x14]
push 2
push 0
push edx
call fcn.004151c5
mov eax, dword [esp + 0x20]
push eax
call fcn.0041570c
mov ecx, dword [esp + 0x24]
push 0
push 0
push ecx
mov edi, eax
call fcn.004151c5
push edi
call fcn.0040775f
mov edx, dword [esp + 0x34]
push edx
push edi
mov esi, eax
push 1
push esi
call fcn.004154ea
mov edi, eax
mov eax, dword [esp + 0x44]
push eax
call fcn.0041403f
mov ecx, dword [esp + 0x54]
add esp, 0x40
push ecx
push edi
push esi
call fcn.004024d0
mov edx, dword [esp + 0x28]
push 0x46882c
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00414744
mov ecx, dword [esp + 0x24]
push ecx
push edi
push 1
push esi
call fcn.00413f46
mov edx, dword [esp + 0x34]
push edx
call fcn.0041403f
push esi
call fcn.0040776a
add esp, 0x30
pop edi
pop esi
add esp, 8
ret
Function at 0x403d40
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x403d4b
xor eax, eax
ret
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 4]
push esi
not eax
cmp edx, 8
jb 0x403e29
mov esi, edx
shr esi, 3
push edi
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x469fb8]
inc ecx
sub edx, 8
sub esi, 1
jne 0x403d65
pop edi
test edx, edx
je 0x403e4b
lea ecx, [ecx]
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x469fb8]
inc ecx
sub edx, 1
jne 0x403e30
not eax
pop esi
ret

Function at 0x403e50
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [edx]
movsx ecx, byte [esp + 8]
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x469fb8]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x469fb8]
mov dword [edx + 8], ecx
ret

Function at 0x404390
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
mov edi, dword [esp + 0x1c]
mov esi, ebx
imul esi, dword [esp + 0x18]
cmp byte [edi], 0
je 0x4043d2
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 4]
push 0
lea eax, [esp + 0x18]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4043c6
mov byte [edi + 8], 1
mov eax, dword [esp + 0x14]
pop edi
xor edx, edx
pop esi
div ebx
pop ebx
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
lea edx, [ecx + esi]
cmp edx, eax
jbe 0x4043e3
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x10]
push esi
push eax
push ecx
call fcn.00415b20
add dword [edi + 0x1c], esi
add esp, 0xc
pop edi
mov eax, esi
xor edx, edx
pop esi
div ebx
pop ebx
ret
Function at 0x4053a0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x20c
mov eax, dword [0x47deb4]
xor eax, esp
mov dword [esp + 0x208], eax
push ebp
mov ebp, dword [esp + 0x218]
push edi
mov edi, dword [esp + 0x218]
test edi, edi
je 0x4053dd
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4053dd
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebp]
test al, al
je 0x405496
push esi
mov esi, ebp
mov ecx, ebp
lea ecx, [ecx]
cmp al, 0x2f
je 0x4053f8
cmp al, 0x5c
jne 0x4053fa
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4053f0
cmp esi, ebp
je 0x405430
sub esi, ebp
push esi
lea eax, [esp + 0x114]
push ebp
push eax
call fcn.00415b20
lea ecx, [esp + 0x11c]
push ecx
push edi
mov byte [esp + esi + 0x124], 0
call fcn.004053a0
add esp, 0x14
mov byte [esp + 0xc], 0
test edi, edi
je 0x40544b
lea edx, [esp + 0xc]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405441
mov eax, ebp
mov edx, ebp
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405450
lea edi, [esp + 0xc]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405460
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0xc]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop esi
cmp eax, 0xffffffff
jne 0x405496
push 0
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esp + 0x210]
pop edi
pop ebp
xor ecx, esp
call fcn.0041465a
add esp, 0x20c
ret
Function at 0x406c50
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 8
push ebx
push edi
mov edi, dword [esp + 0x14]
xor ebx, ebx
cmp edi, ebx
jne 0x406c6a
pop edi
mov eax, 0xffffff9a
pop ebx
add esp, 8
ret
cmp dword [edi + 0x18], ebx
je 0x406c5f
cmp dword [edi + 0x7c], ebx
je 0x406c7d
push edi
call fcn.00404cc0
add esp, 4
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
push edi
call fcn.00404ae0
add esp, 0x10
test eax, eax
je 0x406ca4
pop edi
mov eax, 0xffffff99
pop ebx
add esp, 8
ret
push esi
push 0x84
call fcn.00416011
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x406ce5
push 0x4000
call fcn.00416011
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add esp, 4
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
cmp eax, ebx
jne 0x406cf1
push esi
call fcn.00414cca
add esp, 4
pop esi
pop edi
mov eax, 0xffffff98
pop ebx
add esp, 8
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x406d3d
lea eax, [esi + 4]
push eax
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.004040b0
add esp, 4
test eax, eax
jne 0x406d3d
mov dword [esi + 0x40], 1
mov ecx, dword [edi + 0x40]
mov dword [esi + 0x58], ecx
mov edx, dword [edi + 0x44]
mov dword [esi + 0x5c], edx
mov al, byte [edi + 0x30]
and al, 1
mov byte [esi + 0x6c], al
mov ecx, dword [edi + 0x30]
shr ecx, 3
test cl, 1
je 0x406d67
mov dl, byte [edi + 0x39]
mov byte [esi + 0x80], dl
jmp 0x406d70
mov al, byte [edi + 0x3f]
mov byte [esi + 0x80], al
movzx ecx, byte [esi + 0x6c]
neg ecx
sbb ecx, ecx
push ebp
mov ebp, dword [esp + 0x20]
and ecx, 0xc
lea ebx, [esi + 0x70]
mov dword [esi + 0x7c], ecx
mov dword [ebx], 0x12345678
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
test ebp, ebp
je 0x406db7
mov edi, edi
movzx eax, byte [ebp]
test al, al
je 0x406db7
push eax
push ebx
call fcn.00403e50
add esp, 8
add ebp, 1
jne 0x406da0
mov edx, dword [edi + 0x78]
mov eax, dword [esp + 0x14]
lea ecx, [edx + eax + 0x1e]
pop ebp
mov dword [esi + 0x3c], ecx
mov dword [esi + 8], 0
mov dword [edi + 0x7c], esi
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 8
ret
Function at 0x407040
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, ecx
cmp dword [ebx], 0
jne 0x40710d
cmp dword [ebx + 4], 0xffffffff
jne 0x40710d
push edi
lea edi, [ebx + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407070
sub eax, edx
mov al, byte [eax + ebx + 0x13f]
cmp al, 0x5c
je 0x4070a1
cmp al, 0x2f
je 0x4070a1
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x407090
mov ax, word [0x46a4dc]
mov word [edi], ax
mov edi, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x10]
cmp edi, 1
jne 0x4070cc
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4070cc
pop esi
pop edi
mov eax, 0x2000000
pop ebx
ret 0xc
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push edi
push edx
push esi
call fcn.00404160
add esp, 0x10
test eax, eax
jne 0x4070ee
mov eax, dword [esp + 0x18]
pop esi
pop edi
pop ebx
ret 0xc
push eax
call fcn.00406a80
add esp, 4
mov dword [ebx], eax
neg eax
sbb eax, eax
pop esi
and eax, 0xfffffe00
pop edi
add eax, 0x200
pop ebx
ret 0xc
mov eax, 0x1000000
pop ebx
ret 0xc
Function at 0x41465a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x47deb4]
jne 0x414664
repz ret
jmp fcn.0041b4cc

Function at 0x42603a
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0041a153
and dword [ebp - 4], 0
cmp dword [0x481db0], 0
mov ebx, eax
jne 0x4260eb
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x42619c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x46d93c
push edi
call esi
test eax, eax
je 0x42619c
push eax
call fcn.0041a0e1
mov dword [esp], 0x46d92c
push edi
mov dword [0x481db0], eax
call esi
push eax
call fcn.0041a0e1
mov dword [esp], 0x46d918
push edi
mov dword [0x481db4], eax
call esi
push eax
call fcn.0041a0e1
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x481db8], eax
call esi
push eax
call fcn.0041a0e1
pop ecx
mov dword [0x481dc0], eax
test eax, eax
je 0x4260eb
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0041a0e1
pop ecx
mov dword [0x481dbc], eax
mov eax, dword [0x481dbc]
cmp eax, ebx
je 0x426143
cmp dword [0x481dc0], ebx
je 0x426143
push eax
call fcn.0041a15c
push dword [0x481dc0]
mov esi, eax
call fcn.0041a15c
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x426143
test edi, edi
je 0x426143
call esi
test eax, eax
je 0x42613a
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x42613a
test byte [ebp - 0xc], 1
jne 0x426143
or dword [ebp + 0x10], 0x200000
jmp 0x42617c
mov eax, dword [0x481db4]
cmp eax, ebx
je 0x42617c
push eax
call fcn.0041a15c
pop ecx
test eax, eax
je 0x42617c
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x42617c
mov eax, dword [0x481db8]
cmp eax, ebx
je 0x42617c
push eax
call fcn.0041a15c
pop ecx
test eax, eax
je 0x42617c
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x481db0]
call fcn.0041a15c
pop ecx
test eax, eax
je 0x42619c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x42619e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x42a300
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x47deb4]
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 0x42a353
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x42a34d
shr eax, 8
cmp al, 2
jne 0x42a34d
call fcn.0042a710
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 2
call fcn.0041465a
mov esp, ebp
pop ebp
ret
Function at 0x437050
Capabilities:
Receive data
Receive data on socket

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

Function at 0x4371d0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x1a8]
test ecx, ecx
je 0x4371eb
mov edx, dword [esi + 0x134]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
js 0x43721f
cmp eax, 2
jg 0x43721f
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [eax + eax*2 + 0x46ea10]
push 2
push edx
call fcn.00413f46
mov eax, dword [esi + 0x130]
push eax
push 1
push edi
push ebx
call fcn.00413f46
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebx
mov ebx, dword [eax + ecx*4 + 0x190]
mov edx, ecx
add edx, edx
push esi
lea esi, [eax + edx*8 + 0x1b8]
mov edx, dword [eax + 0x440]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [edx + 0x3c], 3
je 0x437820
cmp dword [eax + ecx*4 + 0x1a8], 0x437510
jne 0x437820
cmp dword [esi], 0
je 0x4377bd
test edi, edi
je 0x437820
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.0042aa20
add esp, 0x14
cmp eax, 0xffffffff
je 0x437820
test al, 1
je 0x437820
cmp dword [esi], 0
jne 0x437802
push 0x8000
mov dword [esi + 4], 0x8000
call dword [0x47f274]
mov edi, dword [esi + 4]
xor ecx, ecx
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
cmp eax, ecx
je 0x43781d
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x437820
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
ret
mov dword [esi + 4], ecx
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + ecx*4 + 0x190]
mov eax, esi
call fcn.00437780
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x4378b3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2733
jne 0x437888
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push eax
push esi
call fcn.0043d500
mov edx, dword [esi]
push eax
push str.Send_failure:__s
push edx
call fcn.00437390
mov eax, dword [esi]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x473c], ecx
add esp, 0x14
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x439840
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x47deb4]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
cmp dword [esi + 0x538], eax
push 4
lea ecx, [ebp - 0x14]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x439893
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00437310
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x53c]
push edx
mov dword [ebp - 0x10], 1
call fcn.0043b170
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x540]
push eax
call fcn.0043b170
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push 0xc
lea edx, [ebp - 0x10]
push edx
push 0x98000004
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x439905
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00437310
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
Function at 0x439fa0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x47deb4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x8c], 2
mov ebx, dword [esi]
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x110], ebx
je 0x43a189
cmp dword [esi + 0x3a0], 0
push edi
jne 0x43a17f
cmp dword [esi + 0x410], 0
jne 0x43a17f
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x104]
push ecx
push edi
mov dword [ebp - 0x10c], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x43a044
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.0043d500
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.00437390
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
push 0x80
lea edx, [ebp - 0x84]
push 0
push edx
mov dword [ebp - 0x10c], 0x80
call fcn.004147a0
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x84]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x43a0ad
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.0043d500
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00437390
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
lea edi, [esi + 0x102]
lea ebx, [esi + 0x130]
lea esi, [ebp - 0x104]
mov dword [ebp - 0x114], edi
call fcn.00439f60
test eax, eax
jne 0x43a10a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x108]
mov esi, eax
push esi
push edx
call fcn.0043d500
push eax
mov eax, dword [ebp - 0x110]
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.00437390
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x108]
mov esi, dword [ebp - 0x114]
lea edi, [eax + 0x58]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [eax + 0x164]
lea edi, [eax + 0x134]
lea esi, [ebp - 0x84]
call fcn.00439f60
test eax, eax
jne 0x43a179
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x108]
mov esi, eax
push esi
push ecx
call fcn.0043d500
mov edx, dword [ebp - 0x110]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.00437390
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041465a
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x108]
push esi
call fcn.00439ee0
add esp, 4
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041465a
mov esp, ebp
pop ebp
ret
Function at 0x43a1a0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
push 4
lea eax, [ebp + 8]
push eax
push 1
push 6
push ecx
mov dword [ebp + 8], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x43a1e9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0043d500
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00437310
add esp, 0x14
pop edi
pop esi
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00437310
add esp, 8
pop edi
pop esi
pop ebp
ret

Function at 0x43a200
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x482054]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x43a251
push 3
push 2
push eax
push 6
call fcn.0043ae80
add esp, 0x10
test eax, eax
je 0x43a245
mov dword [0x482054], 2
mov esp, ebp
pop ebp
ret
mov dword [0x482054], 1
jmp 0x43a256
cmp eax, 2
je 0x43a297
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x43a27f
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jg 0x43a296
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1d8], 0
je 0x43a360
push eax
call fcn.0042c2b0
add esp, 4
test eax, eax
jne 0x43a380
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x190]
cmp eax, 0xffffffff
je 0x43a35c
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x43a380
pop ebp
ret
mov eax, 1
pop ebp
ret