joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a02575
Capabilities:
Access peb ldr_data

Disassembly:
add esp, 8
and dword [esp], ebx
push ecx
push edx
push edi
push esi
or edi, 0xffffffff
not edi
add edi, dword [ebp + 8]
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0xc]
push ecx
xor edx, edx
mov ecx, dword [ecx]
cmp ecx, dword [esp]
je 0x40a0284b
push ebp
push 0xffffffffffffffff
sub esp, 0x32
mov dword [esp + 0x2e], 0x713066e2
add esp, 0x2e
sub esp, 4
mov dword [esp], 0x712fd6a8
push 0xffffffffffffffff
call fcn.409f9775
xchg edx, eax
and eax, 0
add eax, 0x75d46dc4
push ecx
and ecx, 0xcfb6d7ec
mov ecx, esp
mov dword [ecx - 0x54], esi
pop ecx
ja 0x40a025df
and eax, eax
xchg edx, eax
mov edx, dword [ecx + edx - 0x75d46dac]
call fcn.40a025f7
mov byte [0xee69f033], al
invalid
mov eax, ecx
pop esi
mov edi, dword [esp]
add esp, 4
pop edx
xor ecx, ecx
add ecx, 0xffffffff
and ecx, dword [esp]
xor ecx, 0
add esp, 4
pop ebx
mov esp, ebp
mov ebp, dword [esp]
add esp, 4
jno 0x40a0283f
xor eax, 0
ret 4
xor ecx, ecx
jmp 0x40a02813
Function at 0x40a12045
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x40a12067
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x40a12067
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x40a12067
ret
cmp word [ebx + 4], 0x14c
jne 0x40a12067
test word [ebx + 0x16], 2
je 0x40a12067
test word [ebx + 0x16], 0x100
je 0x40a12067
cmp word [ebx + 0x18], 0x10b
jne 0x40a12067
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x40a12067
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x40a120f3
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x40a12087
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.409f8fd2
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x40a12067
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8

Function at 0x40a120f3
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x40a12067
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x40a12067
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x40a12067
ret
cmp word [ebx + 4], 0x14c
jne 0x40a12067
test word [ebx + 0x16], 2
je 0x40a12067
test word [ebx + 0x16], 0x100
je 0x40a12067
cmp word [ebx + 0x18], 0x10b
jne 0x40a12067
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x40a12067
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x40a120f3
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x40a12087
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.409f8fd2
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x40a12067
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8
Function at 0x40a121aa
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x40a12203
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x40a121aa
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x40a121b9
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x40e17e5c
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x40a1220a
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.409f9080
cmp eax, dword [ebp + 0xc]
pop eax
je 0x40a122a9
add edi, 4
add eax, 2
dec ecx
jne 0x40a121ef
call 0x40a12256
loope 0x40a1224c
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x40a122a6
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x40a122b7
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x40a1226a
cmp eax, ecx
ja 0x40a1226a
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x40a122f4
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x40a122ea
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.409f955f
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x40a121b9
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x40a12203
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x40a121aa
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x40a121b9
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x40e17e5c
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x40a1220a
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.409f9080
cmp eax, dword [ebp + 0xc]
pop eax
je 0x40a122a9
add edi, 4
add eax, 2
dec ecx
jne 0x40a121ef
call 0x40a12256
loope 0x40a1224c
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x40a122a6
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x40a122b7
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x40a1226a
cmp eax, ecx
ja 0x40a1226a
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x40a122f4
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x40a122ea
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.409f955f
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x403149
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4bae2c
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x4f9b3c]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x4f9b3c]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ebx, [esp + 0x58]
mov dword [esp + 0x18], eax
call fcn.00403e88
mov edi, eax
xor ebx, ebx
lea esi, [esp + 0x20]
mov dword [esp + 0xf8], ebx
call fcn.00403876
push edi
push eax
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0x104], 1
call fcn.00404348
add esp, 0xc
push ebx
push 1
mov ecx, esi
call fcn.0040187b
push ebx
push 1
lea ecx, [esp + 0x60]
call fcn.0040187b
lea eax, [esp + 0x74]
call fcn.0040456c
cmp dword [esp + 0x50], 0x10
mov eax, dword [esp + 0x3c]
jae 0x4031f2
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x78]
call fcn.00404588
lea eax, [esp + 0x74]
call fcn.00404571
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov byte [esp + 0xf8], 5
xor eax, eax
mov byte [esp + 0x14], bl
lea edi, [esp + 0x15]
stosw word es:[edi], ax
stosb byte es:[edi], al
xor edi, edi
mov eax, dword [esp + 0x1c]
movzx eax, byte [edi + eax]
push eax
lea eax, [esp + 0x18]
push str._02x
push eax
call fcn.00497957
add esp, 0xc
push dword [esp + 0x18]
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
lea eax, [esp + 0x22]
lea esi, [esp + 0x2c]
call fcn.00402f3f
inc edi
cmp edi, 0x10
jl 0x403230
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x20]
push 0x40
pop esi
cmp eax, esi
ja 0x40327c
mov esi, eax
push esi
push dword [esp + 0x24]
push dword [esp + 0x20]
call fcn.004927d0
add esp, 0xc
lea ecx, [esp + 0x20]
call fcn.004820f8
push ebx
push 1
lea ecx, [esp + 0x44]
call fcn.0040187b
mov eax, esi
mov ecx, dword [esp + 0xf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd8]
xor ecx, esp
call fcn.004927bf
mov esp, ebp
pop ebp
ret
Function at 0x403c6b
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bace1
mov eax, dword fs:[0]
push eax
mov eax, 0x10b8
call fcn.00494df0
mov eax, dword [0x4f9b3c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1058], eax
xor ebx, ebx
push ebx
lea eax, [ebp - 0x1064]
push eax
lea eax, [ebp - 0x1054]
push eax
xor edi, edi
lea eax, [ebp - 0x1050]
inc edi
push eax
mov dword [ebp - 0x1064], 0xc
mov dword [ebp - 0x105c], edi
mov dword [ebp - 0x1060], ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x403e6c
push 0x44
pop esi
push esi
lea eax, [ebp - 0x10c4]
push ebx
push eax
call fcn.00492b40
add esp, 0xc
lea eax, [ebp - 0x10c4]
push eax
mov dword [ebp - 0x10c4], esi
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [ebp - 0x1054]
mov dword [ebp - 0x1084], eax
mov dword [ebp - 0x1088], eax
xor eax, eax
push 0x10
mov word [ebp - 0x1094], ax
lea eax, [ebp - 0x1074]
push ebx
push eax
mov dword [ebp - 0x1098], 0x101
call fcn.00492b40
add esp, 0xc
lea eax, [ebp - 0x1074]
push eax
lea eax, [ebp - 0x10c4]
push eax
push ebx
push ebx
push ebx
push edi
push ebx
push ebx
push str.ipconfig__all
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x403e5c
push 0xffffffffffffffff
push dword [ebp - 0x1074]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1074]
call edi
push dword [ebp - 0x1070]
call edi
push 0xfff
lea eax, [ebp - 0x1013]
push ebx
push eax
mov byte [ebp - 0x1014], bl
call fcn.00492b40
add esp, 0xc
push ebx
lea eax, [ebp - 0x1078]
push eax
push 0x1000
lea eax, [ebp - 0x1014]
push eax
push dword [ebp - 0x1050]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e5c
lea eax, [ebp - 0x1014]
push eax
lea ecx, [ebp - 0x1030]
call fcn.00401998
mov dword [ebp - 4], ebx
push ebx
jmp 0x403e3b
mov ecx, dword [ebp - 0x1058]
cmp dword [ecx + 0x10], ebx
je 0x403dfe
push 0x2b
push 1
call fcn.004040fa
push 0x11
push esi
lea eax, [ebp - 0x104c]
push eax
lea ecx, [ebp - 0x1030]
call fcn.0040415a
mov ecx, dword [ebp - 0x1058]
push 0xffffffffffffffff
push ebx
push eax
mov byte [ebp - 4], 1
call fcn.004042ae
push ebx
push 1
lea ecx, [ebp - 0x104c]
mov byte [ebp - 4], bl
call fcn.0040187b
add esi, 0xf
push esi
lea esi, [ebp - 0x1030]
call fcn.00403900
mov esi, eax
pop ecx
cmp esi, 0xffffffff
jne 0x403dea
push ebx
push 1
lea ecx, [ebp - 0x1030]
call fcn.0040187b
push dword [ebp - 0x1054]
call edi
push dword [ebp - 0x1050]
call edi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004927bf
leave
ret
Function at 0x40456c
Capabilities:
Hash data with md5

Disassembly:
jmp 0x404591
xor ecx, ecx
mov byte [eax + 0x68], cl
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret

Function at 0x4052b4
Capabilities:
Encode data using xor

Disassembly:
push 0x2c
mov eax, 0x4babcb
call fcn.0049355c
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
push dword [ebp + 8]
lea esi, [ebp - 0x38]
mov dword [ebp - 4], ebx
call fcn.004052a3
xor eax, eax
mov ecx, edi
xor esi, esi
call fcn.004051c0
push 2
mov dword [ebp - 0x14], eax
pop eax
mov ecx, edi
call fcn.004051c0
push 4
mov dword [ebp - 0x18], eax
pop eax
mov ecx, edi
call fcn.004051c0
push 6
mov dword [ebp + 8], eax
pop eax
mov ecx, edi
call fcn.004051c0
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 8
mov ebx, 0xffff
push dword [edi + esi*4]
mov ecx, dword [ebp - 0x14]
call fcn.004051dc
push dword [edi + esi*4 + 0xc]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov eax, dword [edi + esi*4 + 4]
add eax, dword [ebp - 0x18]
and eax, ebx
mov dword [ebp - 0x18], eax
mov eax, dword [edi + esi*4 + 8]
add eax, dword [ebp + 8]
and eax, ebx
mov dword [ebp + 8], eax
call fcn.004051dc
mov ecx, dword [ebp + 8]
push dword [edi + esi*4 + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], ecx
xor ecx, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.004051dc
mov ecx, dword [ebp - 0x1c]
xor ecx, dword [ebp - 0x18]
push dword [edi + esi*4 + 0x14]
add ecx, eax
and ecx, ebx
mov dword [ebp + 8], eax
call fcn.004051dc
mov ecx, dword [ebp + 8]
xor dword [ebp - 0x14], eax
add ecx, eax
xor eax, dword [ebp - 0x24]
and ecx, ebx
xor dword [ebp - 0x1c], ecx
xor ecx, dword [ebp - 0x28]
add esi, 6
dec dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov dword [ebp + 8], ecx
jne 0x40531f
push dword [edi + esi*4]
mov ecx, dword [ebp - 0x14]
call fcn.004051dc
mov ebx, dword [ebp + 0xc]
mov ecx, eax
xor eax, eax
mov edx, ebx
call fcn.004051cf
mov ecx, dword [edi + esi*4 + 4]
add ecx, dword [ebp + 8]
push 2
pop eax
mov edx, ebx
call fcn.004051cf
lea esi, [edi + esi*4 + 8]
mov ecx, dword [esi]
add ecx, dword [ebp - 0x18]
push 4
pop eax
mov edx, ebx
call fcn.004051cf
push dword [esi + 4]
mov ecx, dword [ebp - 0x1c]
call fcn.004051dc
push 6
mov ecx, eax
pop eax
mov edx, ebx
call fcn.004051cf
lea ecx, [ebp - 0x38]
call fcn.004820f8
mov al, 1
call fcn.00493634
ret 8
Function at 0x4056c8
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
mov ebx, eax
push 3
mov esi, edx
pop ecx
xor edx, edx
lea eax, [edi*4 + 2]
div ecx
mov ecx, ebx
push eax
call fcn.00404f8b
mov eax, dword [ebx]
mov bl, byte [esi]
mov dword [ebp - 0xc], eax
add edi, esi
mov dword [ebp - 8], 8
jmp 0x40576c
push 6
pop edx
mov al, bl
cmp dword [ebp - 8], edx
jbe 0x405713
and al, 0x3f
shr bl, 6
sub dword [ebp - 8], edx
jmp 0x405743
inc esi
cmp esi, edi
jae 0x40571c
mov bl, byte [esi]
jmp 0x40571e
xor bl, bl
sub edx, dword [ebp - 8]
mov byte [ebp - 1], bl
je 0x40573f
mov cl, byte [edx*4 + 0x4dd8f4]
and cl, bl
mov bl, cl
mov ecx, dword [ebp - 8]
shl bl, cl
mov cl, dl
or al, bl
mov bl, byte [ebp - 1]
shr bl, cl
add dword [ebp - 8], 2
cmp al, 0xa
jae 0x40574b
add al, 0x30
jmp 0x405764
cmp al, 0x24
jae 0x405753
add al, 0x37
jmp 0x405764
cmp al, 0x3e
jae 0x40575b
add al, 0x3d
jmp 0x405764
setne al
dec al
and al, 0xce
add al, 0x5f
mov ecx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov byte [ecx], al
cmp esi, edi
jb 0x4056ff
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405775
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x4f9b3c]
xor eax, esp
mov dword [esp + 0x194], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4057bc
cmp byte [esp], 2
jne 0x4057b6
mov eax, dword [esp]
shr eax, 8
cmp al, 2
jne 0x4057b6
xor eax, eax
jmp 0x4057bf
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.004927bf
mov esp, ebp
pop ebp
ret

Function at 0x407706
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
call fcn.0040f313
mov edi, eax
mov eax, dword [ebp + 8]
mov ecx, edx
cdq
mov ebx, 0x3e8
idiv ebx
imul edx, edx, 0x3e8
add edi, eax
add ecx, edx
mov eax, 0xf4240
cmp ecx, eax
jl 0x407735
inc edi
sub ecx, eax
cmp dword [esi + 0x867c], 0
jne 0x407747
cmp dword [esi + 0x8680], 0
je 0x407761
push dword [esi + 0x8680]
push dword [esi + 0x867c]
push ecx
push edi
call fcn.0040f329
add esp, 0x10
test eax, eax
jg 0x40776b
pop edi
pop ebx
mov eax, esi
pop ebp
jmp fcn.0040759d
pop edi
pop ebx
pop ebp
ret
Function at 0x40c892
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x4f9b3c]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
xor eax, eax
xor edi, edi
cmp dword [esi + 0x45c], edi
push 4
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x40c8dc
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0040eb9d
add esp, 0xc
jmp 0x40c942
mov eax, dword [esi + 0x460]
mov dword [ebp - 0x10], 1
call fcn.004166cb
imul eax, eax, 0x3e8
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x464]
call fcn.004166cb
imul eax, eax, 0x3e8
push edi
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push edi
push edi
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x40c942
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.0040eb9d
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.004927bf
leave
ret
Function at 0x40cef9
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x4f9b3c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0x8c], 2
push edi
mov edi, dword [esi]
mov dword [ebp - 0x114], edi
je 0x40d03c
cmp dword [esi + 0x1d0], 0
jne 0x40d037
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x8c]
push eax
push dword [ebp + 8]
mov ebx, 0x80
mov dword [ebp - 0x110], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x40cf7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
push esi
call fcn.00428f6a
pop ecx
push eax
push ebx
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.0040ec0a
add esp, 0x10
jmp 0x40d03c
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x110], ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40cfb6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
push esi
call fcn.00428f6a
pop ecx
push eax
push ebx
push str.getsockname___failed_with_errno__d:__s
jmp 0x40cf6f
lea eax, [esi + 0xb8]
lea ebx, [esi + 0xe8]
lea edi, [ebp - 0x8c]
call fcn.0040cebc
test eax, eax
jne 0x40cfef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00428f6a
pop ecx
push eax
push ebx
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x114]
jmp 0x40cf70
push 0x2e
lea eax, [esi + 0xb8]
push eax
lea eax, [esi + 0x58]
push eax
call fcn.004927d0
add esp, 0xc
lea ebx, [esi + 0x11c]
lea eax, [esi + 0xec]
lea edi, [ebp - 0x10c]
call fcn.0040cebc
test eax, eax
jne 0x40d037
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00428f6a
pop ecx
push eax
push ebx
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x40cfe7
call fcn.0040ce70
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004927bf
leave
ret

Function at 0x40d32a
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x35c]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x40d372
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
mov ebx, eax
call fcn.00428f6a
pop ecx
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0040eb9d
add esp, 0xc
jmp 0x40d37f
push str.TCP_NODELAY_set_n
push esi
call fcn.0040eb9d
pop ecx
pop ecx
pop esi
pop ebx
leave
ret
Function at 0x40d383
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x4f9b3c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
push 2
mov dword [ebp - 0xac], 0x4020
mov dword [ebp - 0xb0], edi
mov dword [ebp - 0xb4], 4
pop ebx
cmp dword [0x4fe1b4], edi
jne 0x40d417
mov esi, 0x9c
push esi
lea eax, [ebp - 0xa8]
push edi
push eax
call fcn.00492b40
add esp, 0xc
push 3
push ebx
push edi
push edi
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0xa4], 6
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push ebx
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x40d40d
mov dword [0x4fe1b4], ebx
jmp 0x40d468
mov dword [0x4fe1b4], 1
cmp dword [0x4fe1b4], ebx
je 0x40d468
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0xb0]
push eax
mov edi, 0x1001
push edi
mov esi, 0xffff
push esi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40d454
mov eax, dword [ebp - 0xb0]
cmp eax, dword [ebp - 0xac]
jg 0x40d468
push 4
lea eax, [ebp - 0xac]
push eax
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004927bf
leave
ret