joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4058b4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x40591a
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.004040d8
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402d90
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x405904
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405921
lea eax, [ebp - 0x10]
call fcn.00403e68
ret

Function at 0x406560
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeec
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x114], ecx
mov esi, edx
mov ebx, eax
lea edi, [ebp - 4]
xor eax, eax
push ebp
push 0x40665b
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jne 0x4065b4
push 0x105
lea eax, [ebp - 0x10d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA_1
mov ecx, eax
lea edx, [ebp - 0x10d]
mov eax, esi
call fcn.00403f58
jmp 0x406642
call sub.kernel32.dll_GetCommandLineA_1
mov dword [edi], eax
mov eax, dword [edi]
call fcn.004064e8
mov dword [edi], eax
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov eax, dword [edi]
call fcn.00406510
mov dword [edi], eax
test ebx, ebx
je 0x4065e2
dec ebx
test ebx, ebx
jl 0x4065e2
mov eax, dword [edi]
cmp eax, dword [ebp - 8]
jne 0x4065bb
push esi
lea eax, [ebp - 0x114]
mov edx, dword [ebp - 8]
call fcn.00404060
mov eax, dword [ebp - 0x114]
mov ecx, dword [edi]
sub ecx, dword [ebp - 8]
mov edx, 1
call fcn.0040435c
mov eax, dword [esi]
call fcn.00404104
cmp eax, 2
jl 0x406642
mov eax, dword [esi]
cmp byte [eax], 0x22
jne 0x406642
mov eax, dword [esi]
call fcn.00404104
mov edx, dword [esi]
cmp byte [edx + eax - 1], 0x22
jne 0x406642
push esi
mov eax, dword [esi]
call fcn.00404104
mov ecx, eax
sub ecx, 2
mov eax, dword [esi]
mov edx, 2
call fcn.0040435c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406662
lea eax, [ebp - 0x114]
call fcn.00403e68
ret

Function at 0x408804
Capabilities:
Hide graphical window

Disassembly:
and byte [eax + 0x37], 0xef
test dl, dl
je 0x408810
or byte [eax + 0x37], 0x10
mov byte [eax + 0x52], dl
mov ecx, dword [eax + 0x28]
jecxz 0x40882c
push eax
je 0x40882d
call dword [0x41d100]
pop eax
push 5
push dword [eax + 0x28]
call sub.user32.dll_ShowWindow
ret
mov byte [eax + 0x177], dl
push 0
push ecx
call sub.user32.dll_ShowWindow
pop eax
call dword [0x41d100]
ret
Function at 0x40a104
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, eax
mov eax, edx
test esi, esi
je 0x40a194
mov edx, dword [esi - 4]
mov edi, eax
test edx, edx
jle 0x40a194
mov ecx, dword [eax]
mov ebx, edx
test ecx, ecx
je 0x40a147
test edx, 3
jne 0x40a136
xor edx, dword [ecx - 4]
cmp edx, 3
jbe 0x40a141
jmp 0x40a147
or edx, 2
xor edx, dword [ecx - 4]
cmp edx, 1
ja 0x40a147
cmp dword [ecx - 8], 1
je 0x40a151
mov edx, ebx
or edx, 3
call fcn.004043e4
mov edi, dword [edi]
mov dword [edi - 4], ebx
mov byte [edi + ebx], 0
add ebx, 0xffffffff
and ebx, 0xfffffffc
mov eax, dword [esi + ebx]
mov ecx, eax
or eax, 0x80808080
mov edx, eax
sub eax, 0x7b7b7b7b
xor edx, ecx
or eax, 0x80808080
sub eax, 0x66666666
and eax, edx
shr eax, 2
xor eax, ecx
mov dword [edi + ebx], eax
mov eax, dword [esi + ebx - 4]
sub ebx, 4
jge 0x40a163
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
pop ebx
jmp fcn.00403e68

Function at 0x40a1a0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, eax
mov eax, edx
test esi, esi
je 0x40a230
mov edx, dword [esi - 4]
mov edi, eax
test edx, edx
jle 0x40a230
mov ecx, dword [eax]
mov ebx, edx
test ecx, ecx
je 0x40a1e3
test edx, 3
jne 0x40a1d2
xor edx, dword [ecx - 4]
cmp edx, 3
jbe 0x40a1dd
jmp 0x40a1e3
or edx, 2
xor edx, dword [ecx - 4]
cmp edx, 1
ja 0x40a1e3
cmp dword [ecx - 8], 1
je 0x40a1ed
mov edx, ebx
or edx, 3
call fcn.004043e4
mov edi, dword [edi]
mov dword [edi - 4], ebx
mov byte [edi + ebx], 0
add ebx, 0xffffffff
and ebx, 0xfffffffc
mov eax, dword [esi + ebx]
mov ecx, eax
or eax, 0x80808080
mov edx, eax
sub eax, 0x5b5b5b5b
xor edx, ecx
or eax, 0x80808080
sub eax, 0x66666666
and eax, edx
shr eax, 2
xor eax, ecx
mov dword [edi + ebx], eax
mov eax, dword [esi + ebx - 4]
sub ebx, 4
jge 0x40a1ff
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
pop ebx
jmp fcn.00403e68

Function at 0x40a864
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404304
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40a87d
test al, 0x10
je 0x40a881
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40d10c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40d145
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403f58
jmp 0x40d14e
mov eax, ebx
mov edx, esi
call fcn.00403ebc
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40d158
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40d179
mov al, byte [esp]
jmp 0x40d17b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x40d810
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40d678
mov eax, dword [0x41dcd0]
cmp byte [eax], 0
je 0x40d88c
mov eax, dword [0x41dbd0]
call fcn.00402c90
call fcn.00402a98
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.0040aa60
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40d8d4
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40d8c2
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x41dba4]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x41e660]
call fcn.00404d5c
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret

Function at 0x40e6ec
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x40e750
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.004040d8
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.0040a55c
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e757
lea eax, [ebp - 0xc]
call fcn.00403e68
ret
Function at 0x416ab8
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffec
mov dword [esp], ecx
mov ebx, edx
mov edi, eax
lea edx, [esp + 4]
mov eax, ebx
mov ecx, 4
call fcn.00402b2c
lea edx, [esp + 8]
mov esi, ebx
mov eax, esi
add eax, 4
mov ecx, 4
call fcn.00402b2c
lea edx, [esp + 0xc]
mov eax, esi
add eax, 8
mov ecx, 4
call fcn.00402b2c
lea edx, [esp + 0x10]
mov eax, esi
add eax, 0xc
mov ecx, 4
call fcn.00402b2c
mov eax, dword [edi + 0xcc]
sub dword [esp + 0xc], eax
mov eax, dword [edi + 0xc8]
sub dword [esp + 4], eax
mov esi, 0x14
mov ebx, dword [esp + 4]
mov eax, dword [esp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x10]
add eax, eax
inc eax
imul dword [esp + 0x10]
mov edx, 5
call fcn.004166d0
mov ebp, eax
mov eax, dword [esp + 8]
add eax, eax
inc eax
imul dword [esp + 8]
mov edx, 5
call fcn.004166d0
mov ebx, eax
mov eax, esi
add eax, eax
push dword [edi + eax*4 + 0x24]
mov eax, dword [esp + 0x10]
pop edx
sub eax, edx
mov edx, ebx
call fcn.004166e4
xor eax, ebp
mov dword [esp + 0xc], eax
mov eax, esi
add eax, eax
push dword [edi + eax*4 + 0x20]
mov eax, dword [esp + 8]
pop edx
sub eax, edx
mov edx, ebp
call fcn.004166e4
xor ebx, eax
mov dword [esp + 4], ebx
dec esi
test esi, esi
jne 0x416b2a
mov eax, dword [edi + 0x24]
sub dword [esp + 0x10], eax
mov eax, dword [edi + 0x20]
sub dword [esp + 8], eax
mov edx, dword [esp]
lea eax, [esp + 4]
mov ecx, 4
call fcn.00402b2c
mov ebx, dword [esp]
mov edx, ebx
add edx, 4
lea eax, [esp + 8]
mov ecx, 4
call fcn.00402b2c
mov edx, ebx
add edx, 8
lea eax, [esp + 0xc]
mov ecx, 4
call fcn.00402b2c
mov edx, ebx
add edx, 0xc
lea eax, [esp + 0x10]
mov ecx, 4
call fcn.00402b2c
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x403910
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4349e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push esi
push edi
mov esi, ecx
push 0x10000
lea ecx, [esp + 0xc]
call fcn.00401090
mov ecx, dword [esp + 0x3c]
lea eax, [esi + 0x1b84]
or edx, 0xffffffff
mov dword [esp + 0x30], 0
mov dword [eax], ecx
mov edi, dword [0x499160]
sub edx, edi
and edx, 0xff
push edx
push 4
push eax
call fcn.0040b350
mov eax, dword [esp + 0x44]
mov ecx, dword [0x499160]
add esp, 0xc
cmp eax, ecx
je 0x403985
mov ecx, esi
call fcn.00403af0
jmp 0x403a0e
mov ecx, dword [esi + 0x1644]
lea edx, [esp + 8]
push ecx
push edx
mov ecx, 0x499158
call fcn.0041dcc0
lea eax, [esp + 8]
mov ecx, esi
push eax
call fcn.00403cf0
mov ecx, esi
call fcn.00404050
test eax, eax
je 0x4039be
mov dword [esi + 0x1b90], 0
jmp 0x4039e0
mov al, byte [0x45e6c4]
test al, al
je 0x4039e0
push 9
lea ecx, [esp + 0xc]
call fcn.00401750
push 0x45e6c4
lea ecx, [esp + 0xc]
call fcn.004017b0
push 0
push 0
lea ecx, [esp + 0x10]
lea edi, [esi + 8]
call fcn.004018e0
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.0040cf40
mov ecx, edi
call fcn.0040cea0
mov dword [esi + 0x1778], 0
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call fcn.00401080
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret 8

Function at 0x403a40
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x434a08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push esi
push edi
mov edi, ecx
push 0x2400
lea ecx, [esp + 0xc]
call fcn.00401090
mov eax, dword [0x499178]
xor esi, esi
test eax, eax
mov dword [esp + 0x30], 0
jle 0x403a97
lea eax, [esp + 8]
push esi
push eax
mov ecx, 0x499158
call fcn.0041cad0
mov eax, dword [0x499178]
inc esi
cmp esi, eax
jl 0x403a7d
push 0
push 0
lea ecx, [esp + 0x10]
lea esi, [edi + 8]
call fcn.004018e0
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov ecx, esi
call fcn.0040cf40
mov ecx, esi
call fcn.0040cea0
lea ecx, [esp + 8]
call fcn.00401180
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call fcn.00401080
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x403af0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x434a28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push esi
push edi
mov esi, ecx
push 0x10000
lea ecx, [esp + 0xc]
call fcn.00401090
xor edi, edi
push 2
mov ecx, esi
mov dword [esp + 0x34], edi
call fcn.00403bc0
push 0x400
lea eax, [esi + 0x1784]
push edi
push eax
mov dword [esi + 0x1778], edi
mov dword [esi + 0x177c], edi
mov dword [esi + 0x1780], edi
call fcn.00413110
mov dword [esi + 0x1b90], 1
add esi, 8
add esp, 0xc
mov ecx, esi
call fcn.0040bf60
lea ecx, [esp + 8]
push ecx
mov ecx, 0x499158
call fcn.0041e0f0
push edi
push edi
lea ecx, [esp + 0x10]
call fcn.004018e0
mov edx, dword [esp + 0x18]
push eax
push edx
mov ecx, esi
call fcn.0040cf40
mov ecx, esi
call fcn.0040cea0
lea ecx, [esp + 8]
call fcn.00401180
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call fcn.00401080
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret

Function at 0x40a1c0
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
ret

Function at 0x40b2c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
and al, 0xfc
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jle 0x40b345
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
lea edi, [esp + 0x18]
mov dword [esp + 0x14], eax
not ebx
neg edi
mov eax, dword [ebp]
xor eax, ebx
push eax
call fcn.00402820
add esp, 4
mov dword [esp + 0x18], eax
xor ecx, ecx
lea esi, [esp + ecx + 0x18]
mov dl, cl
shl dl, cl
lea eax, [edi + esi]
and eax, 0xf
mov al, byte [eax + 0x43c9f4]
or al, dl
mov dl, byte [esi]
or al, cl
or al, 0xa5
xor dl, al
inc ecx
cmp ecx, 4
mov byte [esi], dl
jl 0x40b2ff
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
xor eax, esi
mov dword [ebp], eax
mov eax, dword [esp + 0x14]
add ebp, 4
inc edi
dec eax
mov dword [esp + 0x14], eax
jne 0x40b2eb
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x40b350
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
and al, 0xfc
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jle 0x40b3d6
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
lea edi, [esp + 0x18]
mov dword [esp + 0x14], eax
not ebx
neg edi
mov eax, dword [ebp]
mov ecx, dword [esp + 0x1c]
xor eax, ecx
xor ecx, ecx
mov dword [esp + 0x18], eax
lea esi, [esp + ecx + 0x18]
mov al, cl
shl al, cl
lea edx, [edi + esi]
and edx, 0xf
mov dl, byte [edx + 0x43c9f4]
or dl, al
mov al, byte [esi]
or dl, cl
or dl, 0xa5
xor al, dl
inc ecx
cmp ecx, 4
mov byte [esi], al
jl 0x40b38a
mov eax, dword [esp + 0x18]
push eax
call fcn.00402820
xor eax, ebx
add esp, 4
mov dword [ebp], eax
mov eax, dword [esp + 0x14]
add ebp, 4
inc edi
dec eax
mov dword [esp + 0x14], eax
jne 0x40b37b
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40b3e0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
and al, 0xfc
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jle 0x40b465
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
lea edi, [esp + 0x18]
mov dword [esp + 0x14], eax
not ebx
neg edi
mov eax, dword [ebp]
xor eax, ebx
push eax
call fcn.00402820
add esp, 4
mov dword [esp + 0x18], eax
xor ecx, ecx
lea esi, [esp + ecx + 0x18]
mov dl, cl
shl dl, cl
lea eax, [edi + esi]
and eax, 0xf
mov al, byte [eax + 0x43ca04]
or al, dl
mov dl, byte [esi]
or al, cl
or al, 0xa5
xor dl, al
inc ecx
cmp ecx, 4
mov byte [esi], dl
jl 0x40b41f
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
xor eax, esi
mov dword [ebp], eax
mov eax, dword [esp + 0x14]
add ebp, 4
inc edi
dec eax
mov dword [esp + 0x14], eax
jne 0x40b40b
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x40b470
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
and al, 0xfc
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jle 0x40b4f6
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
lea edi, [esp + 0x18]
mov dword [esp + 0x14], eax
not ebx
neg edi
mov eax, dword [ebp]
mov ecx, dword [esp + 0x1c]
xor eax, ecx
xor ecx, ecx
mov dword [esp + 0x18], eax
lea esi, [esp + ecx + 0x18]
mov al, cl
shl al, cl
lea edx, [edi + esi]
and edx, 0xf
mov dl, byte [edx + 0x43ca04]
or dl, al
mov al, byte [esi]
or dl, cl
or dl, 0xa5
xor al, dl
inc ecx
cmp ecx, 4
mov byte [esi], al
jl 0x40b4aa
mov eax, dword [esp + 0x18]
push eax
call fcn.00402820
xor eax, ebx
add esp, 4
mov dword [ebp], eax
mov eax, dword [esp + 0x14]
add ebp, 4
inc edi
dec eax
mov dword [esp + 0x14], eax
jne 0x40b49b
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40b9c0
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x90
push esi
push edi
mov edi, ecx
call fcn.0040bbe0
mov esi, dword [esp + 0x9c]
test esi, esi
jne 0x40b9e7
pop edi
xor eax, eax
pop esi
add esp, 0x90
ret 4
push esi
call fcn.00413240
add esp, 4
test eax, eax
jne 0x40b9ff
pop edi
pop esi
add esp, 0x90
ret 4
push 0x10
lea eax, [esp + 0xc]
push 0
push eax
call fcn.00413110
push 0x7f
lea ecx, [esp + 0x28]
push esi
push ecx
mov word [esp + 0x20], 2
call fcn.00413210
mov dl, byte [esp + 0x30]
add esp, 0x18
test dl, dl
mov byte [esp + 0x97], 0
lea eax, [esp + 0x18]
je 0x40ba65
mov cl, dl
cmp cl, 0x3a
je 0x40ba49
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40ba3a
jmp 0x40ba65
mov byte [eax], 0
inc eax
push eax
call fcn.00413380
add esp, 4
push eax
call sub.WSOCK32.dll_htons
mov dl, byte [esp + 0x18]
mov word [esp + 0xa], ax
cmp dl, 0x30
jl 0x40baa7
cmp dl, 0x39
jg 0x40baa7
lea edx, [esp + 0x18]
push 0x43ca30
push edx
call fcn.004135c0
add esp, 8
test eax, eax
je 0x40baa7
lea eax, [esp + 0x18]
push eax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x40baa1
pop edi
xor eax, eax
pop esi
add esp, 0x90
ret 4
mov dword [esp + 0xc], eax
jmp 0x40bacb
lea ecx, [esp + 0x18]
push ecx
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x40bac0
pop edi
pop esi
add esp, 0x90
ret 4
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
lea edx, [esp + 8]
mov ecx, edi
push edx
call fcn.0040b860
pop edi
pop esi
add esp, 0x90
ret 4
Function at 0x40dc20
Capabilities:
Send data
Send data on socket

Disassembly:
fld dword [0x450eb0]
fcomp dword [0x436404]
sub esp, 0x10
push ebx
push esi
fnstsw ax
push edi
mov ebx, ecx
test ah, 0x44
jnp 0x40dc65
push 0x3f800000
push 0
call fcn.00413c90
fcomp dword [0x450eb0]
add esp, 8
fnstsw ax
test ah, 5
jp 0x40dc65
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc
mov esi, dword [esp + 0x20]
test esi, esi
jle 0x40dd3b
mov edi, dword [esp + 0x24]
test edi, edi
je 0x40dd3b
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x40dd3b
lea eax, [esp + 0xc]
push eax
call fcn.0040b840
cmp esi, 0x578
push 0x10
jle 0x40dcaf
lea ecx, [esp + 0x10]
push ecx
push 0
push esi
push edi
mov ecx, ebx
call fcn.0040e140
jmp 0x40dcc4
mov eax, dword [ebx + 0xfc4]
lea edx, [esp + 0x10]
push edx
push 0
push esi
push edi
push eax
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x40dd14
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x40dce3
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc
cmp eax, 0x274d
jne 0x40dcf8
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc
cmp eax, 0x2746
jne 0x40dd0d
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc
cmp eax, 0x2741
jne 0x40dd22
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc
push eax
call fcn.0040d9d0
push eax
push str.WARNING__NetSocket::SendPacket:__s_n
push 0x47e730
call fcn.0041a310
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret 0xc

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

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov edi, ecx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
mov edx, dword [edi + 0xfc4]
push ecx
lea ebx, [edi + 8]
push 0
push 0xfaa
push ebx
push edx
mov dword [esp + 0x28], 0x10
call sub.WSOCK32.dll_recvfrom
mov esi, eax
test esi, esi
je 0x40de85
push 0x3f800000
push 0
call fcn.00413c90
fcomp dword [0x450eb0]
add esp, 8
fnstsw ax
test ah, 5
jnp 0x40de85
mov ebp, dword [esp + 0x28]
lea eax, [esp + 0x14]
push eax
mov ecx, ebp
call fcn.0040b860
cmp esi, 0xffffffff
jne 0x40de32
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x40de85
cmp eax, 0x2746
je 0x40de85
cmp eax, 0x274d
je 0x40de85
cmp eax, 0x2738
jne 0x40de0c
push str.WARNING__NetSocket::ReceivePacket:_Ignoring_oversized_network_message_n
push 0x47e730
call fcn.0041a310
add esp, 8
or eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
push eax
call fcn.0040d9d0
push eax
push str.WARNING__NetSocket::ReceivePacket:__s
push 0x47e730
call fcn.0041a310
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
cmp esi, 0xfaa
jne 0x40de61
mov ecx, ebp
call fcn.0040b920
push eax
push str.WARNING__NetSocket::ReceivePacket:_Oversize_packet_from__s_n
push 0x47e730
call fcn.0041a310
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
cmp dword [ebx], 0xfffffffe
jne 0x40de79
push esi
push ebx
mov ecx, edi
call fcn.0040df40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
Function at 0x40e140
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x588
mov eax, dword [ecx + 0x1f80]
mov dword [esp + 0xc], ecx
inc eax
mov dword [ecx + 0x1f80], eax
jns 0x40e163
mov dword [ecx + 0x1f80], 1
mov eax, dword [ecx + 0x1f80]
push ebx
push ebp
mov ebp, dword [esp + 0x598]
mov dword [esp + 0x1c], eax
mov eax, 0xbc750cb3
lea ecx, [ebp + 0x56e]
xor ebx, ebx
mul ecx
shr edx, 0xa
push esi
cmp ebp, ebx
push edi
mov dword [esp + 0x20], 0xfffffffe
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edx
jle 0x40e24e
mov eax, dword [esp + 0x59c]
mov dword [esp + 0x10], eax
jmp 0x40e1ba
mov ebp, dword [esp + 0x5a0]
mov edx, dword [esp + 0x18]
cmp ebp, 0x56f
jle 0x40e1c7
mov ebp, 0x56f
mov cl, bl
mov esi, dword [esp + 0x10]
shl cl, 4
add cl, dl
lea edi, [esp + 0x29]
mov byte [esp + 0x28], cl
mov ecx, ebp
mov edx, ecx
mov eax, dword [esp + 0x5ac]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x5a4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x5ac]
lea eax, [ebp + 9]
push ecx
push edx
mov edx, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx + 0xfc4]
push ecx
push eax
call sub.WSOCK32.dll_sendto
test eax, eax
jl 0x40e252
cmp eax, ebp
jl 0x40e227
add dword [esp + 0x14], ebp
mov eax, dword [esp + 0x5a0]
mov edx, dword [esp + 0x10]
sub eax, ebp
inc ebx
add edx, 0x56f
mov dword [esp + 0x5a0], eax
test eax, eax
mov dword [esp + 0x10], edx
jg 0x40e1af
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x588
ret 0x14

Function at 0x40e740
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
xor edx, edx
push esi
mov dword [esp + 0xc], edx
add ecx, 0x50
mov esi, 2
mov eax, dword [ecx]
test eax, eax
je 0x40e773
cmp edx, 0x40
jae 0x40e773
mov eax, dword [eax + 0xfc4]
mov dword [esp + edx*4 + 0x10], eax
mov edx, dword [esp + 0xc]
inc edx
mov dword [esp + 0xc], edx
add ecx, 4
dec esi
jne 0x40e755
lea ecx, [esp + 4]
lea edx, [esp + 0xc]
push ecx
push 0
push 0
push edx
push 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0
call sub.WSOCK32.dll_select
pop esi
add esp, 0x10c
ret

Function at 0x40e7b0
Capabilities:
Create thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40e7ed
lea eax, [esi + 0x1c]
push eax
push 0
push 0
push 0x40e2a0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [esi + 0x18], eax
jne 0x40e7ed
push str.WARNING__Couldnt_initialize_network_thread__fallback_to_single_thread_mode_n
push 0x47e730
mov dword [esi + 0x14], eax
call fcn.004195f0
add esp, 8
pop esi
ret

Function at 0x40e7f0
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x18]
test eax, eax
je 0x40e803
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x14], 0
pop esi
ret