joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48f420
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5332d1
mov eax, dword fs:[0]
push eax
sub esp, 0x4ac
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov byte [ebp - 0x4ac], 0
mov dword [ebp - 0x4b0], 0
mov dword [ebp - 4], 0
mov ecx, dword [esi + 0x14c]
test ecx, ecx
je 0x48f492
mov eax, dword [esi + 0x164]
mov edx, fcn.004e1b56
test eax, eax
push ecx
cmove eax, edx
call eax
add esp, 4
mov dword [esi + 0x14c], 0
mov ecx, esi
mov dword [esi + 0x150], 0
mov dword [esi + 0x154], 0
call fcn.0048ed60
test al, al
jne 0x48f4b9
or esi, 0xffffffff
jmp 0x48f5f6
push ecx
lea ecx, [ebp - 0x4a8]
call fcn.0045c820
mov dword [ebp - method.t_fileRead.1.virtual_0], vtable.t_fileRead.1.0
mov dword [ebp - method.t_fileRead.virtual_0], vtable.t_fileRead.0
mov dword [ebp - 0x150], 0
mov dword [ebp - 0x14c], 0
mov byte [ebp - 4], 1
lea eax, [esi + 0x10]
cmp byte [esi + 0x120], 0
jne 0x48f500
mov eax, dword [esi + 0xc]
push 0
push 0
push 0
push 0
push 0
add eax, 4
lea ecx, [ebp - 0x148]
push eax
call fcn.00451610
push 0
lea eax, [ebp - 0x148]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x4b0]
push eax
lea ecx, [ebp - 0x4a8]
call fcn.0045c980
test al, al
jne 0x48f540
mov bl, 1
jmp 0x48f578
lea eax, [ebp - 0x4b4]
mov dword [ebp - 0x4b4], 0
push eax
push dword [ebp - 0x4a4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x48f570
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x48f570
xor edi, edi
mov dword [ebp - 0x150], edi
xor bl, bl
mov byte [ebp - 4], 1
cmp byte [ebp - 0x2c], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x48f5a5
mov eax, dword [ebp - 0x140]
lea ecx, [ebp - 0x13c]
cmp eax, ecx
je 0x48f5a5
push eax
call fcn.004e1b56
add esp, 4
test bl, bl
jne 0x48f5d5
push 0x10
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x4b0]
push eax
lea ecx, [ebp - 0x154]
call fcn.00469aa0
test al, al
je 0x48f5d5
mov eax, dword [ebp - 0x20]
cmp eax, dword [esi + 0x12c]
jne 0x48f5d5
mov esi, dword [ebp - 0x14]
jmp 0x48f5d7
xor esi, esi
lea ecx, [ebp - 0x4a8]
mov dword [ebp - method.t_fileRead.1.virtual_0], vtable.t_fileRead.1.0
mov dword [ebp - method.t_byteStreamRead.virtual_0], vtable.t_byteStreamRead.0
call fcn.0045c8c0
lea ecx, [ebp - 0x4b0]
call fcn.00450c20
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
Function at 0x492da0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x2c]
nop dword [eax]
mov eax, dword [edi + 0x2c]
mov edx, dword [edi + 0x3c]
add eax, 0xfffffefa
sub edx, dword [edi + 0x74]
add eax, esi
sub edx, dword [edi + 0x6c]
mov dword [ebp - 4], edx
cmp dword [edi + 0x6c], eax
jb 0x492e48
mov ecx, dword [edi + 0x38]
push esi
lea eax, [ecx + esi]
push eax
push ecx
call fcn.004d9a60
mov ebx, dword [edi + 0x4c]
add esp, 0xc
mov eax, dword [edi + 0x44]
sub dword [edi + 0x70], esi
sub dword [edi + 0x6c], esi
sub dword [edi + 0x5c], esi
lea edx, [eax + ebx*2]
nop
movzx ecx, word [edx - 2]
lea edx, [edx - 2]
mov eax, ecx
mov dword [ebp + 8], 0
sub eax, esi
cmp ecx, esi
movzx eax, ax
cmovb eax, dword [ebp + 8]
mov word [edx], ax
sub ebx, 1
jne 0x492df0
mov eax, dword [edi + 0x40]
mov ebx, esi
lea edx, [eax + esi*2]
nop dword [eax + eax]
movzx ecx, word [edx - 2]
lea edx, [edx - 2]
mov eax, ecx
mov dword [ebp + 8], 0
sub eax, esi
cmp ecx, esi
movzx eax, ax
cmovb eax, dword [ebp + 8]
mov word [edx], ax
sub ebx, 1
jne 0x492e20
mov edx, dword [ebp - 4]
add edx, esi
mov ecx, dword [edi]
cmp dword [ecx + 4], 0
je 0x492ea0
mov eax, dword [edi + 0x74]
add eax, dword [edi + 0x6c]
add eax, dword [edi + 0x38]
push edx
push eax
push ecx
call fcn.00493130
add dword [edi + 0x74], eax
add esp, 0xc
mov ebx, dword [edi + 0x74]
cmp ebx, 3
jb 0x492e8c
mov eax, dword [edi + 0x38]
add eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x58]
movzx edx, byte [eax]
mov dword [edi + 0x48], edx
movzx eax, byte [eax + 1]
shl edx, cl
xor edx, eax
and edx, dword [edi + 0x54]
mov dword [edi + 0x48], edx
cmp ebx, 0x106
jae 0x492ea0
mov eax, dword [edi]
cmp dword [eax + 4], 0
jne 0x492db0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4931a0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4931ac
pop ebp
ret
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.004931c0
Function at 0x495170
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5c6150]
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 0x4951c0
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4951ba
shr eax, 8
cmp al, 2
jne 0x4951ba
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
mov eax, 2
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebx + eax*4 + 0xc8]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
mov esi, eax
mov dword [edi], 0
cmp esi, 0xffffffff
jne 0x49e8aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x49e88b
mov dword [edi], 0x51
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
push eax
push ebx
call fcn.004a2c60
push eax
push str.Send_failure:__s
push dword [ebx]
call fcn.0049e540
add esp, 0x14
mov dword [edi], 0x37
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x49ea80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x16c]
test eax, eax
je 0x49eaa9
push dword [esi + 0xfc]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call eax
add esp, 0x14
pop esi
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp eax, 2
ja 0x49eadf
push dword [esi + 0xf8]
lea eax, [eax + eax*2]
push 1
add eax, 0x541a50
push 2
push eax
call fcn.004e45f2
push dword [esi + 0xf8]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.004e45f2
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x518]
cmp ecx, 0xffffffff
je 0x49ec91
mov eax, dword [eax + 0x50c]
mov eax, dword [eax]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
je 0x49ec91
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x49ec59
mov dword [eax], ecx
mov eax, dword [ecx + 0xc8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
cmp dword [ecx + 0xe0], 0
jne 0x49ec86
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push dword [ecx + 0xc8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x49ec8c
mov dword [esi], 0xffffffff
xor eax, eax
pop esi
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [eax], 0xffffffff
xor eax, eax
pop ebp
ret
Function at 0x49edb0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
cmp dword [ebx + 0x134], 0
mov edi, dword [ebx]
jne 0x49eece
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0x108], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x49ee19
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.004a2c60
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
jmp 0x49eec4
lea eax, [ebp - 0x108]
mov dword [ebp - 0x108], 0x80
push eax
lea eax, [ebp - 0x104]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x49ee54
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.004a2c60
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x49eec4
lea eax, [edi + 0x86c4]
push eax
lea eax, [edi + 0x8694]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.0049f2c0
add esp, 0xc
test eax, eax
jne 0x49ee8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.004a2c60
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x49eec4
lea eax, [edi + 0x86f8]
push eax
lea eax, [edi + 0x86c8]
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.0049f2c0
add esp, 0xc
test eax, eax
jne 0x49eecd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.004a2c60
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.0049e540
add esp, 0x18
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
Function at 0x49f610
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
push 4
mov esi, dword [edi]
mov eax, dword [esi + 0x308]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 1
push 6
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x49f65a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004a2c60
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0049e5e0
add esp, 0x14
pop edi
pop esi
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0049e5e0
add esp, 8
pop edi
pop esi
pop ebp
ret

Function at 0x4a15f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov cl, byte [ebp + 8]
movsx eax, cl
add eax, 0xffffff9f
cmp eax, 0x19
ja case.default.0x4a1601
jmp dword [eax*4 + 0x4a1674]
mov al, 0x41
pop ebp
ret
mov al, 0x42
pop ebp
ret
mov al, 0x43
pop ebp
ret
mov al, 0x44
pop ebp
ret
mov al, 0x45
pop ebp
ret
mov al, 0x46
pop ebp
ret
mov al, 0x47
pop ebp
ret
mov al, 0x48
pop ebp
ret
mov al, 0x49
pop ebp
ret
mov al, 0x4a
pop ebp
ret
mov al, 0x4b
pop ebp
ret
mov al, 0x4c
pop ebp
ret
mov al, 0x4d
pop ebp
ret
mov al, 0x4e
pop ebp
ret
mov al, 0x4f
pop ebp
ret
mov al, 0x50
pop ebp
ret
mov al, 0x51
pop ebp
ret
mov al, 0x52
pop ebp
ret
mov al, 0x53
pop ebp
ret
mov al, 0x54
pop ebp
ret
mov al, 0x55
pop ebp
ret
mov al, 0x56
pop ebp
ret
mov al, 0x57
pop ebp
ret
mov al, 0x58
pop ebp
ret
mov al, 0x59
pop ebp
ret
mov al, 0x5a
pop ebp
ret
mov al, cl
pop ebp
ret
Function at 0x4a20b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5ce478], 0
mov dword [ebp - 0x230], str.getaddrinfo
mov dword [ebp - 0x22c], 0x4a1af0
mov dword [ebp - 0x228], str.getnameinfo
mov dword [ebp - 0x224], 0x4a1e60
mov dword [ebp - 0x220], str.freeaddrinfo
mov dword [ebp - 0x21c], fcn.004a1aa0
jne 0x4a2232
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4a2228
push ebx
push esi
push edi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x110]
push 0x10c
push eax
call fcn.004ee3f4
push str.ws2_32
lea eax, [ebp - 0x110]
push 0x10c
push eax
call fcn.004ee44e
add esp, 0x18
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test edi, edi
je 0x4a2188
push str.getaddrinfo
push edi
call ebx
test eax, eax
jne 0x4a21dd
push edi
call esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x110]
push 0x10c
push eax
call fcn.004ee3f4
push str.wship6
lea eax, [ebp - 0x110]
push 0x10c
push eax
call fcn.004ee44e
add esp, 0x18
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4a2225
push str.getaddrinfo
push edi
call ebx
test eax, eax
jne 0x4a21dd
push edi
call esi
jmp 0x4a2225
xor esi, esi
nop
push dword [ebp + esi*8 - 0x230]
push edi
call ebx
mov dword [ebp + esi*8 - 0x22c], eax
test eax, eax
je 0x4a221e
inc esi
cmp esi, 3
jl 0x4a21e0
mov eax, dword [ebp - 0x22c]
mov dword [0x5c6054], eax
mov eax, dword [ebp - 0x224]
mov dword [0x5c605c], eax
mov eax, dword [ebp - 0x21c]
mov dword [fcn.004a1aa0], eax
jmp 0x4a2225
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebx
mov dword [0x5ce478], 1
movzx eax, word [ebp + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, dword [eax*8 + 0x5c6054]
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret 4
Function at 0x4a2250
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x1c]
lea eax, [ebp - 0x408]
push edi
mov edi, dword [ebp + 8]
push 0x401
push 0
push eax
mov dword [ebp - 0x820], edi
mov dword [ebp - 0x814], esi
mov dword [ebp - 0x818], 0
call fcn.004d9fe0
push 0x401
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.004d9fe0
push 0x400
push edi
lea eax, [ebp - 0x408]
push 0x401
lea ebx, [ebp - 0x80c]
mov dword [ebp - 0x81c], eax
push eax
mov dword [ebp - 0x810], ebx
call fcn.004ee568
add esp, 0x28
nop dword [eax]
nop dword [eax + eax]
push dword [ebp - 0x820]
mov edi, esi
mov dword [esi], 0
mov byte [ebx], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x4a2449
cmp word [ebx + 8], 2
jne 0x4a233e
cmp word [ebx + 0xa], 4
jne 0x4a233e
mov esi, dword [ebx + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x4a233e
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004a24a0
mov dword [edi], eax
test eax, eax
je 0x4a23ee
add esi, 4
lea edi, [eax + 0x1c]
mov eax, dword [esi]
test eax, eax
jne 0x4a2318
push 0x400
push dword [ebx]
mov ebx, dword [ebp - 0x810]
push 0x401
push ebx
call fcn.004ee568
mov eax, dword [ebp - 0x814]
xor esi, esi
add esp, 0x10
cmp dword [eax], esi
jne 0x4a23f8
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a2370
sub ecx, edx
je case.0x4a2459.11003
mov edi, dword [ebp - 0x81c]
mov ecx, ebx
mov eax, edi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4a23b0
test dl, dl
je 0x4a23ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4a23b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4a2390
xor eax, eax
jmp 0x4a23b5
sbb eax, eax
or eax, 1
test eax, eax
je case.0x4a2459.11003
mov esi, dword [ebp - 0x818]
inc esi
mov dword [ebp - 0x818], esi
cmp esi, 0x10
je case.0x4a2459.11003
mov esi, dword [ebp - 0x814]
mov eax, edi
mov dword [ebp - 0x81c], ebx
mov ebx, eax
mov dword [ebp - 0x810], ebx
jmp 0x4a22e0
mov esi, 8
jmp 0x4a2473
cmp dword [ebp + 0x18], esi
je 0x4a2473
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a2402
sub ecx, edx
lea ebx, [ecx + 1]
push ebx
push 1
call fcn.004e2cde
mov edi, eax
add esp, 8
test edi, edi
je 0x4a242f
push dword [ebp - 0x810]
push ebx
push edi
call fcn.004ee3f4
add esp, 0xc
mov ecx, dword [ebp - 0x814]
mov eax, dword [ecx]
mov dword [eax + 0x14], edi
mov eax, dword [ecx]
mov ecx, 8
cmp dword [eax + 0x14], esi
cmove esi, ecx
jmp 0x4a2473
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x4a2459.11001
jmp dword [eax*4 + 0x4a2488]
mov esi, 0x2afa
jmp 0x4a2473
mov esi, 0x2afb
jmp 0x4a2473
mov esi, 0x2af9
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret 0x18
Function at 0x4a2a40
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x48
push 1
call dword [0x5c604c]
mov edi, dword [ebp + 8]
mov esi, eax
add esp, 8
mov ebx, 0xc
mov dword [edi + 0x330], esi
test esi, esi
je 0x4a2b09
push dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
lea eax, [esi + 0x10]
push ecx
push dword [ebp + 0xc]
mov dword [edi + 0x320], ecx
mov dword [edi + 0x328], 0
mov dword [edi + 0x32c], 0
mov dword [edi + 0x324], 0
push eax
mov dword [esi + 4], 0xffffffff
mov dword [esi], 0
call fcn.004a2b30
add esp, 0x10
test eax, eax
je 0x4a2b09
push dword [edi + 0x31c]
call fcn.00499f90
push dword [ebp + 0xc]
call dword [0x5c6048]
add esp, 8
mov dword [edi + 0x31c], eax
test eax, eax
je 0x4a2b09
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4a2b09
lea eax, [esi + 0x10]
push eax
push 0x4a29c0
call fcn.004b7960
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x4a2b26
call fcn.004e1e89
mov ebx, dword [eax]
lea eax, [edi + 0x31c]
push eax
call fcn.004a25a0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret
Function at 0x4ad520
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
or eax, 0xffffffff
push edi
push 1
push 0
mov ebx, dword [esi]
mov edi, dword [esi + 0xcc]
push esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0x10
call fcn.0049ed00
mov ecx, eax
add esp, 0xc
test ecx, ecx
jle 0x4ad595
nop
mov eax, 0x3e8
cmp ecx, eax
cmovl eax, ecx
push eax
push 0xffffffffffffffff
push edi
call fcn.004ab520
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ad647
test eax, eax
jne 0x4ad5b9
push 1
push eax
push esi
call fcn.0049ed00
mov ecx, eax
add esp, 0xc
test ecx, ecx
jg 0x4ad560
push str.Timeout_while_waiting_for_server_connect
push ebx
call fcn.0049e540
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4ad5e5
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x1c], eax
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [ebp - 0x1c]
cmp edi, 0xffffffff
jne 0x4ad618
push str.Error_accept__ing_server_connect
push ebx
call fcn.0049e540
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.0049e5e0
push 1
push edi
mov dword [esi + 0xcc], edi
call fcn.004b77b0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
push str.Error_while_waiting_for_server_connect
push ebx
call fcn.0049e540
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x1e
pop edi
pop esi
pop ebx
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret

Function at 0x4af860
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
lea eax, [ecx - 0xc8]
mov edx, dword [edi]
cmp eax, 0x64
jb 0x4af88f
push str.Couldnt_set_desired_mode
push edx
call fcn.0049e540
add esp, 8
lea eax, [esi + 0x11]
pop edi
pop esi
pop ebp
ret
cmp ecx, 0xc8
je 0x4af8a6
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push edx
call fcn.0049e5e0
add esp, 0xc
mov eax, dword [ebp + 0x10]
cmp eax, 0x13
jne 0x4af8bd
push edi
call fcn.004af3a0
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebp
ret
cmp eax, 0x14
jne 0x4af8d1
push edi
call fcn.004aeea0
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebp
ret
cmp eax, 0x15
jne 0x4af8e5
push edi
call fcn.004af300
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebp
ret
cmp eax, 0x16
jne 0x4af8f5
push edi
call fcn.004af380
mov esi, eax
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
ret
Function at 0x4b2570
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4b25bd
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.0049e540
add esp, 0xc
mov eax, 2
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4b25e5
shr eax, 8
test al, al
jne 0x4b25e5
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.0049e540
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 2
pop esi
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov byte [ebp + 0xa], al
lea eax, [ebp + 8]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0xc8]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b2da8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.0049e540
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.004b26e0
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret