joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408850
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x2c
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x28], eax
xor eax, eax
push esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, 2
push 0x7f000001
or esi, 0xffffffff
mov word [esp + 0x10], ax
call sub.WS2_32.dll_htonl
push 0x10
lea edx, [esp + 0x10]
push edx
xor ecx, ecx
push edi
mov dword [esp + 0x1c], eax
mov word [esp + 0x1a], cx
call sub.WS2_32.dll_bind
cmp eax, esi
je 0x4088ee
mov eax, dword [esp + 0x34]
push 0
push eax
push 2
call sub.WS2_32.dll_socket
mov esi, eax
test esi, esi
jl 0x4088ee
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x20]
push edx
push edi
mov dword [esp + 0x14], 0x10
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x4088ee
cmp dword [esp + 8], 0x10
jne 0x4088ee
push 0x10
lea eax, [esp + 0x20]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408912
push edi
call sub.WS2_32.dll_closesocket
cmp esi, 0xffffffff
je 0x4088ff
push esi
call sub.WS2_32.dll_closesocket
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0059709c
add esp, 0x2c
ret
mov ecx, dword [esp + 0x2c]
mov dword [ebx + 4], esi
pop esi
xor ecx, esp
mov dword [ebx], edi
xor eax, eax
call fcn.0059709c
add esp, 0x2c
ret
Function at 0x408be0
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x14
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x10], eax
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov eax, 2
push 9
mov esi, ecx
mov word [esp + 0x10], ax
call sub.WS2_32.dll_htons
mov word [esp + 0xe], ax
test esi, esi
je 0x408c49
lea ecx, [esi + 4]
push ecx
call sub.WS2_32.dll_inet_addr
lea edx, [esi + 0x14]
push edx
mov edi, eax
call sub.WS2_32.dll_inet_addr
test edi, edi
je 0x408c49
not eax
or eax, edi
push 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
push eax
push 0
push 0x66
push ebx
push ebp
call sub.WS2_32.dll_sendto
mov esi, dword [esi]
test esi, esi
jne 0x408c11
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 1
call fcn.0059709c
add esp, 0x14
ret

Function at 0x408d60
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x70
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x6c], eax
push esi
push edi
push 0
push 2
push 2
mov dword [esp + 0x14], 1
call sub.WS2_32.dll_socket
push 4
mov esi, eax
lea eax, [esp + 0xc]
push eax
push 0x20
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
mov ecx, dword [esp + 0x7c]
or eax, 0xffffffff
mov dword [esp + 0xc], eax
mov word [esp + 0x10], ax
lea eax, [esp + 0x12]
mov edx, 0x10
mov edi, dword [ecx]
mov dword [eax], edi
mov di, word [ecx + 4]
mov word [eax + 4], di
add eax, 6
sub edx, 1
jne 0x408db2
push esi
lea edi, [esp + 0x10]
call fcn.00408c60
add esp, 4
push esi
call sub.WS2_32.dll_closesocket
mov ecx, dword [esp + 0x74]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0059709c
add esp, 0x70
ret
Function at 0x408df0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x254
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x250], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push eax
push str._s.
lea eax, [esp + 0x158]
push 0x104
push eax
call fcn.00599237
add esp, 0x10
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x408f02
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
test byte [esp + 0x10], 0x10
je 0x408ec1
mov ecx, 0x6211f0
lea eax, [esp + 0x3c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408e82
test dl, dl
je 0x408e7e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408e82
add eax, 2
add ecx, 2
test dl, dl
jne 0x408e62
xor eax, eax
jmp 0x408e87
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408ed4
mov ecx, 0x6211f4
lea eax, [esp + 0x3c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408eb4
test dl, dl
je 0x408eb0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408eb4
add eax, 2
add ecx, 2
test dl, dl
jne 0x408e94
xor eax, eax
jmp 0x408eb9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408ed4
push 1
jmp 0x408ec3
push 0
mov eax, dword [esi]
mov edx, dword [eax]
lea ecx, [esp + 0x40]
push ecx
mov ecx, esi
call edx
test eax, eax
jne 0x408ee4
lea eax, [esp + 0x10]
push eax
push edi
call ebx
test eax, eax
jne 0x408e52
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.0059709c
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x25c]
pop edi
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.0059709c
mov esp, ebp
pop ebp
ret

Function at 0x4094e0
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
mov dword [eax + 0x58], ecx
lea eax, [ecx + 1]
ret
Function at 0x413640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
push esi
push edi
mov edi, eax
mov eax, ecx
cdq
sub eax, edx
mov esi, eax
mov eax, dword [ebp + 0x18]
and ecx, 1
sar esi, 1
lea edx, [esi + eax]
add esi, ecx
mov ecx, dword [ebp + 0x14]
push ebx
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x10]
push ecx
push edx
mov edx, dword [ebp + 8]
push eax
mov eax, edi
mov ecx, esi
call fcn.00413210
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
mov edx, dword [ebp + 0xc]
push eax
mov eax, edi
mov ecx, esi
call fcn.00413210
add esp, 0x20
test edi, edi
jle 0x4136b1
mov ecx, dword [ebp + 0x1c]
mov eax, ebx
sub ecx, ebx
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc eax
sub edi, 1
jne 0x4136a6
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x416a00
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0xffffffffffffffff
push 0x5bbc88
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x64786c]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, ecx
xor edi, edi
or eax, 0xffffffff
mov ebp, 1
mov dword [esi + 0x1034], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], eax
mov dword [esi + 0x1030], edi
mov dword [esi + 0x102c], edi
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
cmp dword [0x653730], ebp
jg 0x416a72
mov eax, dword [esi + 4]
push eax
push str.CHttpProvider::HttpProviderData::OnConnectRelease_status_d
push 0x37
push str.....mttpHttpProvider.cpp
push ebp
call fcn.00401320
add esp, 0x14
cmp dword [esi + 4], 7
mov ecx, dword [esi + 0x28]
mov eax, dword [ecx]
je 0x416a87
mov edx, dword [eax + 0x40]
call edx
jmp 0x416b54
mov edx, dword [eax + 0xc]
push str.Connection
call edx
cmp eax, edi
je 0x416b79
push str.Keep_Alive
push eax
call fcn.0059744d
add esp, 8
test eax, eax
jne 0x416b4a
cmp dword [esi + 4], ebp
je 0x416ac0
mov dword [esi + 4], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0x28]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
push str.Keep_Alive
call edx
cmp eax, edi
je 0x416b28
lea ecx, [esp + 0x14]
push ecx
mov ebx, eax
call fcn.00417fc0
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esi + 8], eax
mov dword [esi + 0x10], ecx
cmp dword [0x653730], ebp
jg 0x416bbe
push ecx
push eax
push str.Keep_Alive_____timeout_d__max_d
push 0x4c
push str.....mttpHttpProvider.cpp
push ebp
call fcn.00401320
add esp, 0x18
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov dword [esi + 8], 0x1e
mov dword [esi + 0x10], 0xa
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ecx, dword [esi + 0x28]
mov edx, dword [ecx]
mov eax, dword [edx + 0x40]
call eax
cmp dword [esi + 4], edi
je 0x416bbe
mov dword [esi + 4], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ebx, dword [esi + 0x28]
add ebx, 0x24
push str.Connection
call fcn.004182a0
cmp eax, edi
je 0x416bbe
push str.Keep_Alive
push eax
call fcn.0059744d
add esp, 8
test eax, eax
jne 0x416bbe
cmp dword [esi + 4], ebp
je 0x416bb0
mov dword [esi + 4], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
mov dword [esi + 8], 0x14
mov dword [esi + 0x10], 0x64
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x416d10
Capabilities:
Check for time delay via gettickcount

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov esi, dword [edi + 0x40]
mov edx, dword [esi + 4]
lea eax, [edx - 3]
cmp eax, 4
ja case.0x416d28.5
jmp dword [eax*4 + 0x416e50]
cmp dword [esi + 0x14], 0
jl 0x416d50
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push eax
push ecx
push edx
mov ecx, esi
call fcn.00416670
pop edi
pop esi
ret 0x10
mov ecx, dword [esi + 0x24]
push ebx
mov ebx, dword [esi + 0x20]
mov eax, ebx
or eax, ecx
jne 0x416d7a
mov eax, 7
cmp edx, eax
je 0x416d72
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
pop ebx
pop edi
xor eax, eax
pop esi
ret 0x10
test ecx, ecx
jg 0x416d9d
jl 0x416d84
test ebx, ebx
jae 0x416d9d
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push ecx
push edx
call fcn.00416830
pop ebx
pop edi
pop esi
ret 0x10
mov eax, dword [esp + 0x18]
mov edi, eax
cdq
cmp ecx, edx
jg 0x416db0
jl 0x416dae
cmp ebx, eax
jae 0x416db0
mov edi, ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
mov eax, edi
call fcn.00416830
mov edi, eax
test edi, edi
jge 0x416dd0
pop ebx
pop edi
or eax, 0xffffffff
pop esi
ret 0x10
mov eax, edi
cdq
sub dword [esi + 0x20], eax
sbb dword [esi + 0x24], edx
cmp dword [esi + 0x24], 0
jg 0x416dfd
jl 0x416de7
cmp dword [esi + 0x20], 0
ja 0x416dfd
mov eax, 7
cmp dword [esi + 4], eax
je 0x416dfd
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
mov edx, dword [esi + 0x20]
mov dword [esi + 0x20], edx
mov eax, dword [esi + 0x24]
mov dword [esi + 0x24], eax
pop ebx
mov eax, edi
pop edi
pop esi
ret 0x10
push edi
call fcn.00417500
test eax, eax
je 0x416e46
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
mov edx, dword [edx + 0x34]
push eax
mov eax, dword [esp + 0x14]
push ecx
push eax
mov ecx, edi
call edx
pop edi
pop esi
ret 0x10
pop edi
xor eax, eax
pop esi
ret 0x10
mov dword [edi + 8], 9
pop edi
or eax, 0xffffffff
pop esi
ret 0x10
Function at 0x416d2f
Capabilities:
Check for time delay via gettickcount

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov esi, dword [edi + 0x40]
mov edx, dword [esi + 4]
lea eax, [edx - 3]
cmp eax, 4
ja case.0x416d28.5
jmp dword [eax*4 + 0x416e50]
cmp dword [esi + 0x14], 0
jl 0x416d50
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push eax
push ecx
push edx
mov ecx, esi
call fcn.00416670
pop edi
pop esi
ret 0x10
mov ecx, dword [esi + 0x24]
push ebx
mov ebx, dword [esi + 0x20]
mov eax, ebx
or eax, ecx
jne 0x416d7a
mov eax, 7
cmp edx, eax
je 0x416d72
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
pop ebx
pop edi
xor eax, eax
pop esi
ret 0x10
test ecx, ecx
jg 0x416d9d
jl 0x416d84
test ebx, ebx
jae 0x416d9d
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push ecx
push edx
call fcn.00416830
pop ebx
pop edi
pop esi
ret 0x10
mov eax, dword [esp + 0x18]
mov edi, eax
cdq
cmp ecx, edx
jg 0x416db0
jl 0x416dae
cmp ebx, eax
jae 0x416db0
mov edi, ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
mov eax, edi
call fcn.00416830
mov edi, eax
test edi, edi
jge 0x416dd0
pop ebx
pop edi
or eax, 0xffffffff
pop esi
ret 0x10
mov eax, edi
cdq
sub dword [esi + 0x20], eax
sbb dword [esi + 0x24], edx
cmp dword [esi + 0x24], 0
jg 0x416dfd
jl 0x416de7
cmp dword [esi + 0x20], 0
ja 0x416dfd
mov eax, 7
cmp dword [esi + 4], eax
je 0x416dfd
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0xc], eax
mov edx, dword [esi + 0x20]
mov dword [esi + 0x20], edx
mov eax, dword [esi + 0x24]
mov dword [esi + 0x24], eax
pop ebx
mov eax, edi
pop edi
pop esi
ret 0x10
push edi
call fcn.00417500
test eax, eax
je 0x416e46
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
mov edx, dword [edx + 0x34]
push eax
mov eax, dword [esp + 0x14]
push ecx
push eax
mov ecx, edi
call edx
pop edi
pop esi
ret 0x10
pop edi
xor eax, eax
pop esi
ret 0x10
mov dword [edi + 8], 9
pop edi
or eax, 0xffffffff
pop esi
ret 0x10
Function at 0x417500
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [ebp + 0x40]
mov ebx, 2
mov eax, esi
call fcn.00416550
test eax, eax
jne 0x41752d
pop esi
mov dword [ebp + 8], 0xb
pop ebp
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [ebp + 0x34]
xor eax, eax
push edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
test ecx, ecx
jle 0x417657
mov edx, dword [ebp + 0x2c]
mov edi, dword [edx + eax*4]
mov dword [esp + 0x14], edi
test edi, edi
je 0x41764a
mov edx, dword [edi]
mov eax, edx
lea ebx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417560
sub eax, ebx
mov ebx, eax
mov eax, dword [edi + 4]
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417571
sub eax, ebp
mov ebp, eax
push edx
mov eax, 1
mov ecx, esi
call fcn.004165f0
cmp ebx, eax
jne 0x417711
cmp dword [esi + 0x1034], 1
je 0x417711
mov eax, 0x1000
sub eax, dword [esi + 0x102c]
cmp eax, 2
jge 0x4175c4
mov edi, 1
call fcn.004165b0
test eax, eax
je 0x417711
mov edi, dword [esp + 0x14]
mov ecx, dword [esi + 0x102c]
mov dx, word [0x621cec]
mov word [esi + ecx + 0x2c], dx
add dword [esi + 0x102c], 2
mov edi, dword [edi + 4]
push edi
mov eax, 1
mov ebx, ebp
mov ecx, esi
call fcn.004165f0
cmp ebp, eax
jne 0x417711
mov edi, 1
cmp dword [esi + 0x1034], edi
je 0x417711
mov eax, 0x1000
sub eax, dword [esi + 0x102c]
cmp eax, 2
jge 0x417625
call fcn.004165b0
test eax, eax
je 0x417711
mov ecx, dword [esi + 0x102c]
mov dx, word [0x620818]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
mov word [esi + ecx + 0x2c], dx
add dword [esi + 0x102c], 2
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x417543
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, 1
cmp dword [esi + 0x1034], edi
je 0x4176dd
mov eax, 0x1000
sub eax, dword [esi + 0x102c]
cmp eax, 2
jge 0x417683
call fcn.004165b0
test eax, eax
je 0x4176dd
mov ecx, dword [esi + 0x102c]
mov dx, word [0x620818]
mov word [esi + ecx + 0x2c], dx
mov ecx, 2
add dword [esi + 0x102c], ecx
mov eax, dword [esi + 0x102c]
test eax, eax
jle 0x4176f3
cmp dword [esi + 0x1034], ecx
jne 0x4176f3
mov ecx, dword [esi + 0x28]
mov edx, dword [ecx]
mov edx, dword [edx + 0x38]
push edi
push eax
lea eax, [esi + 0x2c]
push eax
call edx
xor ecx, ecx
cmp dword [esi + 0x102c], eax
mov dword [esi + 0x102c], 0
sete cl
mov eax, ecx
test eax, eax
jne 0x4176f3
xor edi, edi
cmp dword [esi + 4], edi
je 0x4176ec
mov dword [esi + 4], edi
call ebx
mov dword [esi + 0xc], eax
mov dword [ebp + 8], 2
mov eax, 4
cmp dword [esi + 4], eax
je 0x417705
mov dword [esi + 4], eax
call ebx
mov dword [esi + 0xc], eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 4
Function at 0x417d60
Capabilities:
Resolve dns

Disassembly:
push esi
push edi
mov esi, ecx
mov edi, eax
call fcn.00417e00
test edi, edi
je 0x417df3
push 0x210
call fcn.005974ee
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x417df3
push 0x210
push edi
push eax
mov dword [esi + 0x10], 0x210
call fcn.00597e30
mov dword [esi + 0x28], 0
mov esi, dword [esi + 0x14]
add esp, 0xc
cmp dword [esi + 0x88], 0
mov edi, esi
je 0x417dc3
cmp byte [esi + 0x8c], 0
lea eax, [esi + 0x8c]
je 0x417dc3
mov edi, eax
push edi
call sub.WS2_32.dll_inet_addr
mov dword [esi + 0x84], eax
cmp eax, 0xffffffff
jne 0x417deb
push edi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x417df3
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esi + 0x84], edx
pop edi
mov eax, 1
pop esi
ret
pop edi
xor eax, eax
pop esi
ret

Function at 0x4183e0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x5bbf91
mov eax, dword fs:[0]
push eax
push esi
mov eax, dword [0x64786c]
xor eax, esp
push eax
lea eax, [esp + 8]
mov dword fs:[0], eax
mov esi, dword [esp + 0x18]
xor eax, eax
mov dword [esi + 4], vtable.TPObject.0
mov dword [esi + 8], eax
mov dword [esp + 0x10], eax
mov dword [esi], vtable.CConnection.0
mov dword [esi + 4], vtable.CConnection.1.0
mov dword [esi + 0xc], eax
mov edx, vtable.CProperty.0
mov dword [esi + 0x10], edx
mov ecx, vtable.TArray_class_PropItem___10__class_TArrayAllocator_.0
mov dword [esi + 0x14], ecx
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov byte [esp + 0x10], 2
mov ecx, 1
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
cmp dword [0x653730], ecx
jg 0x41847d
push 0x621eac
push 0x12
push str.....mttpConnection.cpp
push ecx
call fcn.00401320
add esp, 0x10
mov eax, esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0xc
ret 4
Function at 0x4189c0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
push edi
call edx
mov ebx, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x40]
mov ecx, esi
call edx
cmp dword [0x656aec], 0
je 0x418a55
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi + 0x44], eax
cmp eax, 0xffffffff
je 0x418a55
mov edi, dword [ebp + 8]
test edi, edi
jle 0x418a1e
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_ioctlsocket
mov edx, dword [esi + 0xc]
mov dword [esi + 0x48], edi
cmp dword [edx + 0x10], 0x210
jne 0x418a60
cmp dword [ebx + 0x88], 0
je 0x418a60
cmp byte [ebx + 0x8c], 0
je 0x418a60
mov eax, ebx
mov ebx, esi
call fcn.004192e0
test eax, eax
jne 0x418a7e
mov eax, dword [esi]
mov edx, dword [eax + 0x40]
mov ecx, esi
call edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x84]
mov ebx, dword [ebx + 0x80]
mov ecx, edi
push eax
mov edi, esi
call fcn.00419130
test eax, eax
je 0x418b2d
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x418a8e
push eax
call fcn.0040a2c0
add esp, 4
mov ecx, dword [0x656aec]
push ecx
call fcn.00409f70
add esp, 4
mov dword [esi + 0x4c], eax
test eax, eax
jne 0x418ad1
cmp dword [0x653730], 3
jg 0x418ac6
push str.Cant_create_ssl...
push 0x84
push str.....mttpSSLConnection.cpp
push 3
call fcn.00401320
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esi + 0x44]
push edx
push eax
call fcn.0040a530
add esp, 8
cmp dword [esi + 0x50], 0
je 0x418af3
mov edi, esi
call fcn.00418b80
test eax, eax
je 0x418a55
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x418b41
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [esi + 0x4c]
push ecx
push 0
push edx
call eax
add esp, 0x14
test eax, eax
je 0x418b41
cmp dword [esi + 0x3c], 0
je 0x418b26
mov eax, dword [esi + 0xc]
mov dword [eax + 8], 5
cmp dword [esp + 0x14], 0
je 0x418b63
mov edx, dword [esi]
mov eax, dword [edx + 0x40]
mov ecx, esi
call eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0x653730], 1
jg 0x418b63
push str.Connected_with_using_ssl.
push 0xad
push str.....mttpSSLConnection.cpp
push 1
call fcn.00401320
add esp, 0x10
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x419130
Capabilities:
Connect socket
Get socket status

Disassembly:
sub esp, 0x12c
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x128], eax
mov eax, dword [esp + 0x130]
push esi
push ebx
mov esi, ecx
mov dword [esp + 0x124], eax
call sub.WS2_32.dll_htons
cmp dword [0x653730], 1
mov ecx, 2
mov word [esp + 0x11e], ax
mov word [esp + 0x11c], cx
jg 0x41919e
mov edx, dword [esp + 0x120]
push ebx
push edx
call sub.WS2_32.dll_inet_ntoa
push eax
push str.Socket_connecting_to__s:_d_...
push 0x4a
push str.....mttpTcpConnection.cpp
push 1
call fcn.00401320
add esp, 0x18
mov ecx, dword [edi + 0x44]
push 0x10
lea eax, [esp + 0x120]
push eax
push ecx
call sub.WS2_32.dll_connect
test eax, eax
je 0x4192a3
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x419264
test esi, esi
jle 0x419264
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [edi + 0x44]
mov dword [esp + 8], eax
imul eax, eax, 0x3e8
sub esi, eax
lea eax, [esp + 8]
imul esi, esi, 0x3e8
push eax
push 0
lea ecx, [esp + 0x18]
push ecx
push 0
push 1
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], 1
call sub.WS2_32.dll_select
test eax, eax
je 0x419225
cmp eax, 0xffffffff
jne 0x4192a3
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x41923a
push eax
call sub.WS2_32.dll_closesocket
mov dword [edi + 0x44], 0xffffffff
cmp dword [edi + 0x3c], 0
je 0x41924a
mov edx, dword [edi + 0xc]
mov dword [edx + 8], 5
xor eax, eax
pop esi
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0059709c
add esp, 0x12c
ret 4
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x419279
push eax
call sub.WS2_32.dll_closesocket
mov dword [edi + 0x44], 0xffffffff
cmp dword [edi + 0x3c], 0
je 0x419289
mov eax, dword [edi + 0xc]
mov dword [eax + 8], 5
xor eax, eax
pop esi
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0059709c
add esp, 0x12c
ret 4
cmp dword [0x653730], 1
jg 0x4192c2
push str.Connected.
push 0x74
push str.....mttpTcpConnection.cpp
push 1
call fcn.00401320
add esp, 0x10
mov ecx, dword [esp + 0x12c]
pop esi
xor ecx, esp
mov eax, 1
call fcn.0059709c
add esp, 0x12c
ret 4