joyce8/EMBER2024-capa huggingface dataset:
Function at 0x423c9f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x43ea88]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x423ce5
cmp word [ebx], dx
jne 0x423ce5
or byte [eax + edi + 0x28], 4
jmp 0x423cea
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x423e4d
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x423e2d
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x423d2b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x423d61
cmp eax, edx
jae 0x423d6f
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x423d06
jmp 0x423e4d
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x423e28
cmp dword [ebp - 0x18], 0
je 0x423e28
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x43ea88]
test byte [eax + edi + 0x28], 0x48
je 0x423dfe
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x423dc2
mov word [esi], cx
jmp 0x423df9
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x43ea88]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x43ea88]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x43ea88]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x423e4d
pop eax
cmp word [ebp - 4], ax
jne 0x423e0e
cmp esi, ebx
jne 0x423e0e
mov word [esi], ax
jmp 0x423e4a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004246d8
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x423e4d
push 0xd
pop eax
jmp 0x423e09
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x43ea88]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x423e47
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x423e4d
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x426e4f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x426eec
push ebx
push esi
call fcn.00426e18
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0042130a
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x426e99
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x426eeb
push edi
push eax
call fcn.0041f4e5
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x426eb9
call fcn.0041f4ab
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x426eea
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0042130a
add esp, 0x20
test eax, eax
jne 0x426ed8
push edi
call fcn.0041f4ab
jmp 0x426ee0
push ebx
call fcn.0041f4ab
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4296be
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0041f1c0
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x42972d
cmp esi, dword [ebp - 4]
je 0x429728
cmp dword [ebp + 0xc], 0
je 0x429728
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x429705
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.00429210
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x42972f
xor eax, eax
inc eax
jmp 0x42972f
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x429794
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x43d080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.0041f1c0
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0041f1c0
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x42980b
cmp word [ecx], dx
je 0x42980b
mov eax, dword [0x435a84]
push edi
dec eax
push eax
push 0x435970
call fcn.00429733
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x42987e
cmp word [eax], dx
je 0x42987e
mov eax, dword [edi]
test eax, eax
je 0x42982f
cmp word [eax], dx
je 0x42982f
lea eax, [ebp - 0x10]
push eax
call fcn.00429116
jmp 0x429838
lea eax, [ebp - 0x10]
push eax
call fcn.004291b1
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x4298a8
mov eax, dword [0x43596c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x435660
call fcn.00429733
add esp, 0xc
test al, al
je 0x4298a8
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x429873
cmp word [eax], di
je 0x429873
lea eax, [ebp - 0x10]
push eax
call fcn.00429116
pop ecx
jmp 0x4298aa
lea eax, [ebp - 0x10]
push eax
call fcn.004291b1
jmp 0x429870
mov eax, dword [edi]
test eax, eax
je 0x429895
cmp word [eax], dx
je 0x429895
lea eax, [ebp - 0x10]
push eax
call fcn.004290cb
pop ecx
jmp 0x4298a8
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x429973
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.004295b8
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x429973
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x429973
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x429973
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x429900
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00420f74
test ebx, ebx
je 0x42996e
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00420f74
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x429973
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x429973
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0042d7e7
add esp, 0x10
xor eax, eax
inc eax
jmp 0x429975
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a26f
leave
ret
Function at 0x42df65
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0042dee1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x42e0d4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x42e0d4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x42e089
jg 0x42dfc1
test eax, eax
je 0x42e07f
push 1
push 0x1000
call fcn.004208e0
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x42dfe4
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x42e076
push 0x8000
push ebx
call fcn.0041c296
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x42e00d
jg 0x42e008
cmp ecx, 0x1000
jb 0x42e00d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00422224
add esp, 0x10
cmp eax, 0xffffffff
je 0x42e052
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x42e008
jl 0x42e039
test ecx, ecx
jne 0x42dffa
push dword [ebp - 0xc]
push ebx
call fcn.0041c296
push esi
call fcn.0041f4ab
add esp, 0xc
xor ebx, ebx
jmp 0x42e0e2
cmp byte [edi + 0x24], 0
je 0x42e069
cmp dword [edi + 0x20], 5
jne 0x42e069
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x42e074
mov ebx, dword [edi + 0x18]
jmp 0x42e076
xor ebx, ebx
push esi
call fcn.0041f4ab
pop ecx
jmp 0x42e0e2
test ecx, ecx
jg 0x42e04b
jl 0x42e089
test eax, eax
jae 0x42e04b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004246d8
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x42e0a9
cmp byte [edi + 0x1c], 0
je 0x42e04b
jmp 0x42e0da
push ebx
call fcn.0042768f
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x42e04b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x42e0e2
cmp byte [edi + 0x1c], 0
je 0x42e0df
mov ebx, dword [edi + 0x18]
jmp 0x42e0e2
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004246d8
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x42f440
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42f46d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42f46d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401000
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x401052
mov eax, dword [esp]
cmp al, 2
jne 0x40104c
shr eax, 8
cmp al, 2
jne 0x40104c
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.0053a230
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.0053a230
add esp, 0x194
ret
Function at 0x40c8a0
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 0x40c8d2
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 0x40ca10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa4
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0xb8]
push ebx
mov ebx, dword [esp + 0xb0]
push ebp
mov ebp, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0xb4]
cmp dword [esi + 0x2e8], 0
push edi
je case.default.0x40ca70
test eax, eax
je case.default.0x40ca70
mov eax, dword [eax + 0x9c]
test eax, eax
je case.default.0x40ca70
lea edx, [ebx - 1]
mov ecx, str.Data
cmp edx, 3
ja case.default.0x40ca70
jmp dword [edx*4 + 0x40cb8c]
mov ecx, str.Header
mov edx, str.from
jmp 0x40ca8d
mov ecx, str.Header
mov edx, 0x5644d4
push eax
push edx
push ecx
push str.__s__s__s_
lea eax, [esp + 0x20]
push 0xa0
push eax
call fcn.00410dc0
lea eax, [esp + 0x28]
add esp, 0x18
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cab0
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x40cb05
mov ecx, dword [esi + 0x134]
push ecx
push edi
lea edx, [esp + 0x18]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x40cb70
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x40cb33
mov ecx, dword [esi + 0x134]
mov edx, dword [esp + 0xc4]
push ecx
push edx
push ebp
push ebx
push esi
call eax
add esp, 0x14
jmp 0x40cb70
mov eax, dword [esi + 0x130]
push eax
push 1
push 2
push 0x5685e4
call fcn.00545c0c
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [esp + 0x28]
push edi
push edx
call fcn.00545c0c
add esp, 0x20
jmp case.default.0x40ca70
test ebx, ebx
js 0x40cb6e
cmp ebx, 2
jg 0x40cb6e
mov eax, dword [esi + 0x130]
push eax
push 1
lea ecx, [ebx + ebx*2 + 0x5685e4]
push 2
push ecx
call fcn.00545c0c
mov edx, dword [esi + 0x130]
mov eax, dword [esp + 0xd4]
push edx
push 1
push eax
push ebp
call fcn.00545c0c
add esp, 0x20
xor eax, eax
mov ecx, dword [esp + 0xb0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0053a230
add esp, 0xa4
ret
Function at 0x40cc30
Capabilities:
Write file on windows

Disassembly:
push ecx
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp], eax
mov ecx, dword [esp + 0xc]
push ebx
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
lea ebx, [esi + 0x5e4]
push 0x4000
push ebx
call fcn.00410d60
mov eax, dword [esi + 0x138]
add esp, 0x10
test eax, eax
je 0x40cc90
cmp dword [esi + 0x8610], 0
jne 0x40cc90
push ebx
push 0x5ae7e8
push 0x100
push eax
call fcn.00410dc0
add esp, 0x10
mov dword [esi + 0x8610], 1
cmp dword [esi + 0x334], 0
je 0x40cd17
mov eax, ebx
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cca0
sub eax, edx
push edi
mov edi, eax
cmp edi, 0x3fff
jae 0x40ccc4
mov byte [esi + edi + 0x5e4], 0xa
inc edi
mov byte [esi + edi + 0x5e4], cl
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x40ccee
mov edx, dword [esi + 0x134]
push edx
push edi
push ebx
push 0
push esi
call eax
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [esp]
xor ecx, esp
call fcn.0053a230
pop ecx
ret
mov eax, dword [esi + 0x130]
push eax
push 1
push 2
push 0x5685e4
call fcn.00545c0c
mov ecx, dword [esi + 0x130]
push ecx
push 1
push edi
push ebx
call fcn.00545c0c
add esp, 0x20
pop edi
mov ecx, dword [esp + 8]
pop esi
pop ebx
xor ecx, esp
call fcn.0053a230
pop ecx
ret
Function at 0x40cd30
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xb8
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0xb4], eax
mov ecx, dword [esp + 0xc4]
push ebx
mov ebx, dword [esp + 0xc4]
push esi
mov esi, dword [ebx]
push edi
lea eax, [esp + 0xd4]
push eax
push ecx
call fcn.00411870
mov edi, eax
add esp, 8
mov dword [esp + 0x18], edi
test edi, edi
jne 0x40cd8d
lea eax, [edi + 0x1b]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb4]
xor ecx, esp
call fcn.0053a230
add esp, 0xb8
ret
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd90
sub eax, edx
mov ecx, eax
mov dword [esp + 0xc], edi
push ebp
mov edx, dword [esp + 0xcc]
xor eax, eax
cmp edx, dword [ebx + 0x158]
lea edx, [esp + 0x18]
push edx
sete al
push ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
push ecx
mov dword [esp + 0x24], 0
mov edx, dword [ebx + eax*4 + 0x174]
push eax
push ebx
call edx
mov ebp, eax
xor ecx, ecx
add esp, 0x14
cmp ebp, ecx
jge 0x40cdf6
mov eax, dword [esp + 0x18]
cmp eax, ecx
je 0x40ced9
cmp eax, 0x51
jne 0x40ced3
xor ebp, ebp
mov dword [esp + 0x14], ecx
cmp dword [esi + 0x334], ecx
je 0x40ce8e
cmp dword [esi + 0x2e8], ecx
je 0x40ce6f
mov eax, dword [ebx + 0x9c]
cmp eax, ecx
je 0x40ce6f
push eax
push 0x5644d4
push str.Data
push str.__s__s__s_
lea eax, [esp + 0x34]
push 0xa0
push eax
call fcn.00410dc0
lea eax, [esp + 0x3c]
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ce41
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x40cea5
mov ecx, dword [esi + 0x134]
push ecx
push edi
lea edx, [esp + 0x2c]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x40ce8e
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x40ce8e
mov ecx, dword [esi + 0x134]
mov edx, dword [esp + 0x10]
push ecx
push ebp
push edx
push 4
push esi
call eax
add esp, 0x14
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
cmp ebp, ecx
je 0x40cee1
sub ecx, ebp
add dword [esp + 0x10], ebp
jmp 0x40cda0
mov eax, dword [esi + 0x130]
push eax
push 1
push 2
push 0x5685e4
call fcn.00545c0c
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [esp + 0x3c]
push edi
push edx
call fcn.00545c0c
add esp, 0x20
jmp 0x40ce6f
mov dword [esp + 0x14], eax
jmp 0x40cee1
mov dword [esp + 0x14], 0x37
push edi
call dword [0x5b44c4]
mov ecx, dword [esp + 0xc8]
mov eax, dword [esp + 0x18]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0053a230
add esp, 0xb8
ret
Function at 0x40cf10
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 + 0x154]
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
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x40cf8d
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x40cf64
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.00401bc0
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.0040cc30
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x8614], ebp
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x40f0a0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0x14], eax
xor eax, eax
cmp dword [esi + 0x470], eax
push 4
lea ecx, [esp + 4]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x40f0f4
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0040cba0
add esp, 0xc
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0053a230
add esp, 0x18
ret
mov edx, dword [esi + 0x474]
push edx
mov dword [esp + 0xc], 1
call fcn.004146b0
imul eax, eax, 0x3e8
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x478]
push eax
call fcn.004146b0
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xc
lea edx, [esp + 0x20]
push edx
push 0x98000004
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x40f16d
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.0040cba0
add esp, 0x10
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0053a230
add esp, 0x18
ret
Function at 0x40f770
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0x108], eax
push ebp
mov ebp, dword [esp + 0x114]
cmp dword [ebp + 0x8c], 2
push edi
mov edi, dword [ebp]
mov dword [esp + 0xc], edi
je 0x40f8e5
cmp dword [ebp + 0x1f8], 0
push ebx
push esi
jne 0x40f8da
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x40f7fc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.00401bc0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.0040cc30
add esp, 0x18
jmp 0x40f8e3
push ebx
lea edx, [esp + 0x1c]
push 0
push edx
mov dword [esp + 0x1c], ebx
call fcn.0053bcd0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40f849
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.00401bc0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0040cc30
add esp, 0x18
jmp 0x40f8e3
lea edi, [ebp + 0xb8]
lea ebx, [ebp + 0xe8]
lea esi, [esp + 0x98]
call fcn.0040f730
test eax, eax
jne 0x40f88a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00401bc0
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.0040cc30
add esp, 0x18
jmp 0x40f8e3
lea edi, [ebp + 0x58]
mov ecx, 0xb
lea esi, [ebp + 0xb8]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [ebp + 0x11c]
lea edi, [ebp + 0xec]
lea esi, [esp + 0x18]
call fcn.0040f730
test eax, eax
jne 0x40f8da
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00401bc0
push eax
mov eax, dword [esp + 0x20]
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.0040cc30
add esp, 0x18
jmp 0x40f8e3
push ebp
call fcn.0040f6d0
add esp, 4
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
pop edi
pop ebp
xor ecx, esp
call fcn.0053a230
add esp, 0x10c
ret

Function at 0x40f900
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x364]
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
jns 0x40f943
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00401bc0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0040cba0
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0040cba0
add esp, 8
pop esi
pop ecx
ret