joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41f558
Capabilities:
Read .ini file

Disassembly:
push ebx
push ebp
push esi
push edi
mov esi, 0x200
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
mov ebp, esi
neg ecx
or ecx, eax
push ecx
call fcn.00436e9c
pop ecx
mov ebx, eax
mov eax, dword [esp + 0x14]
push dword [eax + 4]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
mov edi, eax
lea eax, [edi + 2]
cmp eax, esi
jb 0x41f5d0
push ebx
add ebp, esi
call fcn.00437d0a
xor ecx, ecx
push 2
pop edx
lea eax, [ebp + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00436e9c
pop ecx
pop ecx
mov ebx, eax
mov eax, dword [esp + 0x14]
push dword [eax + 4]
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
mov edi, eax
lea eax, [edi + 2]
cmp eax, ebp
jae 0x41f595
push ebx
call fcn.00437d0a
pop ecx
lea eax, [edi + 2]
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x41f7af
Capabilities:
Read .ini file

Disassembly:
cmp dword [esp + 4], 0
jne 0x41f7ba
xor eax, eax
jmp 0x41f81d
push esi
push ebx
call fcn.0041f558
mov esi, eax
test esi, esi
je 0x41f81c
push edi
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00436e9c
mov edi, eax
test edi, edi
pop ecx
jne 0x41f7ee
push ebx
call fcn.0041f558
jmp 0x41f7f9
push dword [ebx + 4]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
push dword [esp + 0xc]
mov eax, edi
push 0x41fc95
call fcn.0041fc5e
mov esi, eax
neg esi
sbb esi, esi
push edi
inc esi
call fcn.00437d0a
add esp, 0xc
mov eax, esi
pop edi
pop esi
ret 4

Function at 0x41fa02
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
je 0x41fab9
cmp dword [ebp + 0x10], edi
je 0x41fab9
push ebx
mov esi, 0x200
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
mov ebx, esi
neg ecx
or ecx, eax
push ecx
call fcn.00436e9c
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
test eax, eax
pop ecx
jne 0x41fa4b
mov eax, 0x4713dc
mov ecx, dword [ebp + 8]
push dword [ecx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push esi
push dword [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call edi
inc eax
cmp eax, esi
jb 0x41fab3
push dword [ebp - 4]
add ebx, esi
call fcn.00437d0a
xor ecx, ecx
push 2
pop edx
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00436e9c
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
test eax, eax
pop ecx
pop ecx
jne 0x41fa9b
mov eax, 0x4713dc
mov ecx, dword [ebp + 8]
push dword [ecx + 4]
push ebx
push dword [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call edi
inc eax
cmp eax, ebx
jae 0x41fa69
mov eax, dword [ebp - 4]
pop ebx
jmp 0x41fafa
cmp dword [ebp + 0x14], edi
jne 0x41facd
push 2
call fcn.00436e9c
mov esi, eax
pop ecx
mov word [esi], di
jmp 0x41faf8
push dword [ebp + 0x14]
call fcn.00437547
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00436e9c
push dword [ebp + 0x14]
mov esi, eax
push esi
call fcn.0043b3b8
add esp, 0x10
mov eax, esi
pop edi
pop esi
leave
ret 0x10
Function at 0x420160
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x480244]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x198]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4201a1
cmp byte [ebp - 0x198], 1
jne 0x42019b
cmp byte [ebp - 0x197], 1
je 0x4201a4
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00437538
leave
ret

Function at 0x4202e7
Capabilities:
Resolve function by parsing pe exports

Disassembly:
test edx, edx
jne 0x4202ef
push 0x2b
pop eax
ret
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
jmp fcn.00423f7f

Function at 0x420942
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esi + 0x88]
test eax, eax
je 0x42095f
push dword [esi + 0x14]
push dword [esp + 0xc]
push dword [esp + 0xc]
push ecx
push esi
call eax
add esp, 0x14
ret
test ecx, ecx
jl 0x420990
cmp ecx, 2
jg 0x420990
push dword [esi + 0x10]
push 1
push 2
push dword [ecx*4 + 0x472b80]
call fcn.004600fd
push dword [esi + 0x10]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004600fd
add esp, 0x20
xor eax, eax
ret
Function at 0x427282
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
lea edx, [ecx + eax]
cmp ecx, edx
mov eax, 0x1505
jae 0x42729d
push esi
movsx esi, byte [ecx]
imul eax, eax, 0x21
xor eax, esi
inc ecx
cmp ecx, edx
jb 0x42728f
pop esi
ret

Function at 0x4285d3
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x480244]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi]
push dword [esi + 0x74]
mov dword [ebp - 0x124], edi
call fcn.00437560
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x428736
and dword [ebp - 0x120], 0
push ecx
lea eax, [ebp - 0x10b]
push 0
push eax
mov byte [ebp - 0x10c], 0
call fcn.00437c90
mov ebx, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 0xc
push dword [esi + 0x74]
call ebx
lea eax, [ebp - 0x120]
push eax
push 0
push dword [esi + 0x74]
push edi
call fcn.004270f8
add esp, 0x10
cmp eax, 1
jne 0x42865d
lea eax, [ebp - 0x120]
push eax
push edi
call fcn.0042d09d
pop ecx
pop ecx
mov edi, dword [ebp - 0x120]
test edi, edi
je 0x428678
push dword [esi + 0x74]
lea eax, [ebp - 0x10c]
push eax
call fcn.00460180
pop ecx
pop ecx
cmp byte [ebp - 0x10c], 0
jne 0x42868e
push dword [esi + 0x74]
push str.Couldnt_bind_to__s
jmp 0x42872f
lea eax, [ebp - 0x10c]
push eax
push str.We_bind_local_end_to__s_n
call fcn.0042067b
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x428723
test edi, edi
je 0x428723
mov ebx, dword [edi]
call fcn.0042723e
push dword [ebx + 0x10]
push dword [ebx + 0x14]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x4286fe
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x128], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x42871f
push str.getsockname___failed
call fcn.004206e4
jmp 0x428735
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x8318], eax
mov ebx, eax
mov eax, dword [ebp - 0x124]
call fcn.0042917c
push eax
push str.bind_failure:__s
jmp 0x42872f
xor eax, eax
jmp 0x428739
lea eax, [ebp - 0x10c]
push eax
push str.couldnt_find_my_own_IP_address___s_
call fcn.004206e4
pop ecx
pop ecx
push 0x2d
pop eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00437538
leave
ret
Function at 0x428a53
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x480244]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ebx, edx
push dword [ebx + 0xc]
mov edi, ecx
push dword [edi + 0x28]
mov eax, dword [edi]
push dword [ebx + 4]
mov dword [ebp - 0x98], edi
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0x90], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp - 0x8c], eax
je 0x428c37
lea eax, [ebp - 0x88]
push 0x80
push eax
mov ecx, ebx
mov byte [esi], 0
call fcn.00426f7c
mov esi, dword [ebp - 0x90]
lea eax, [ebp - 0x88]
push eax
push str.__Trying__s...
call fcn.0042067b
mov eax, esi
add esp, 0x10
cmp byte [eax + 0x1b6], 0
je 0x428ae9
push dword [ebp - 0x8c]
call fcn.004289fd
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x74], 0
je 0x428b07
push dword [ebp - 0x8c]
mov ecx, edi
call fcn.004285d3
test eax, eax
pop ecx
jne 0x428c2b
push dword [ebp - 0x8c]
xor eax, eax
inc eax
call fcn.00428599
cmp dword [edi + 0x28], 1
pop ecx
jne 0x428b32
push dword [ebx + 0x10]
push dword [ebx + 0x14]
push dword [ebp - 0x8c]
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
jmp 0x428b34
xor edi, edi
cmp edi, 0xffffffff
jne 0x428bcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xb
mov dword [ebp - 0x94], ebx
je 0x428bbc
cmp ebx, 0x2732
jle 0x428b60
cmp ebx, 0x2734
jle 0x428bbc
mov eax, dword [ebp - 0x98]
call fcn.0042917c
push eax
lea eax, [ebp - 0x88]
push eax
push str.Failed_to_connect_to__s:__s
call fcn.004206e4
add esp, 0xc
mov dword [esi + 0x8318], ebx
push dword [ebp - 0x8c]
lea esi, [ebp - 0x94]
call fcn.00428748
test edi, edi
pop ecx
jne 0x428be4
test al, al
je 0x428bfb
mov eax, dword [ebp - 0x9c]
mov esi, dword [ebp - 0x90]
push str.connected_n
mov byte [eax], 1
call fcn.0042067b
pop ecx
jmp 0x428bdc
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x8c]
call fcn.004285b4
mov edi, eax
cmp edi, 1
jne 0x428b86
mov eax, esi
cmp dword [eax + 0x2d8], 2
jne 0x428b86
mov eax, dword [ebp - 0x8c]
jmp 0x428c3a
cmp edi, 1
jne 0x428bfb
mov esi, dword [ebp - 0x90]
push str.Timeout_n
call fcn.0042067b
jmp 0x428c2a
mov ebx, dword [ebp - 0x94]
mov eax, dword [ebp - 0x90]
mov dword [eax + 0x8318], ebx
mov eax, dword [ebp - 0x98]
call fcn.0042917c
mov esi, dword [ebp - 0x90]
push eax
push 0x474d78
call fcn.0042067b
pop ecx
pop ecx
push dword [ebp - 0x8c]
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00437538
leave
ret
Function at 0x429c68
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
cdq
mov ecx, 0x3e8
idiv ecx
push ebx
push esi
xor esi, esi
or ecx, 0xffffffff
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x21c], esi
imul edx, edx, 0x3e8
mov dword [ebp - 8], edx
xor edx, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
inc edx
cmp eax, 0xffffffff
je 0x429cbd
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x114], edx
mov ecx, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x324], esi
je 0x429d14
xor eax, eax
cmp dword [ebp - 0x114], esi
mov dword [ebp - 0x320], edi
mov dword [ebp - 0x324], edx
jbe 0x429cf0
cmp dword [ebp + eax*4 - 0x110], edi
je 0x429cf0
inc eax
cmp eax, dword [ebp - 0x114]
jb 0x429cde
cmp eax, dword [ebp - 0x114]
jne 0x429d0e
cmp dword [ebp - 0x114], 0x40
jae 0x429d0e
mov dword [ebp + eax*4 - 0x110], edi
inc dword [ebp - 0x114]
cmp edi, ecx
jbe 0x429d14
mov ecx, edi
lea ebx, [ecx + 1]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp esi, 0xffffffff
jne 0x429d49
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 4
je 0x429d17
test esi, esi
jge 0x429d52
or eax, 0xffffffff
jmp 0x429db9
jne 0x429d58
xor eax, eax
jmp 0x429db9
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
je 0x429d8a
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x429d74
inc esi
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x429d8a
or esi, 4
cmp edi, 0xffffffff
je 0x429db7
lea eax, [ebp - 0x324]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x429da3
or esi, 2
lea eax, [ebp - 0x114]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x429db7
or esi, 4
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42cf3d
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 1
push 0x28
call dword [0x4815e0]
mov esi, eax
xor ebx, ebx
xor eax, eax
cmp esi, ebx
pop ecx
lea edi, [ebp - 8]
mov dword [ebp - 0xc], ebx
pop ecx
stosd dword es:[edi], eax
jne 0x42cf72
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x42d098
mov edi, dword [ebp + 8]
lea eax, [edi + 0x320]
push dword [eax]
mov dword [ebp - 4], eax
call fcn.00423cc6
push dword [ebp + 0xc]
call dword [0x4815dc]
cmp eax, ebx
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jne 0x42cfa3
push esi
call dword [0x4815d4]
pop ecx
jmp 0x42cf63
mov eax, dword [ebp + 0x10]
push ebx
push 1
mov dword [edi + 0x324], eax
mov byte [edi + 0x32c], bl
mov dword [edi + 0x330], ebx
mov dword [edi + 0x328], ebx
mov dword [edi + 0x334], esi
or dword [esi + 0xc], 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x14], eax
jne 0x42cfe9
push dword [ebp - 4]
call fcn.0042ce84
pop ecx
push 0xb
jmp 0x42cf65
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x18], eax
je 0x42cfd9
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x20], eax
je 0x42cfd9
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x24], eax
je 0x42cfd9
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x1c], eax
je 0x42cfd9
call fcn.0044b93c
add eax, 0x40
mov dword [esi + 0x10], eax
lea eax, [esi + 4]
push eax
push ebx
push edi
push 0x42cda7
push ebx
push ebx
call fcn.00461487
add esp, 0x18
cmp eax, ebx
mov dword [esi], eax
jne 0x42d070
call fcn.0043ae90
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 4]
call fcn.0042ce84
pop ecx
jmp 0x42cf6b
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x1c]
push 0xffffffffffffffff
mov dword [ebp - 8], eax
push ebx
lea eax, [ebp - 0xc]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0xc], eax
mov al, 1
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42d09d
Capabilities:
Terminate thread

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp]
mov ebx, dword [eax + 0x9c]
test ebx, ebx
push esi
push edi
mov edi, dword [ebp + 0x334]
mov dword [esp + 0x18], eax
jne 0x42d0ce
mov eax, dword [eax + 0x98]
test eax, eax
mov ebx, eax
jne 0x42d0ce
mov ebx, 0x12c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
imul ebx, ebx, 0x3e8
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push dword [edi + 0x18]
call esi
push dword [edi + 0x14]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [edi + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [edi + 0x18]
and dword [edi + 0x14], 0
call ebx
xor ebx, ebx
cmp dword [esp + 0x10], ebx
mov dword [edi + 0x18], ebx
jne 0x42d12b
push 0x1388
push dword [edi]
call esi
cmp eax, 0x102
jne 0x42d176
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea ebx, [edi + 8]
mov byte [ebp + 0x32c], 1
or dword [ebx], 0xffffffff
mov eax, dword [esp + 0x1c]
xor edi, edi
cmp eax, edi
je 0x42d14a
mov ecx, dword [ebp + 0x328]
mov dword [eax], ecx
cmp dword [ebp + 0x328], edi
jne 0x42d1e2
mov ebx, dword [ebx]
push 0x1b
pop edi
cmp ebx, edi
jne 0x42d190
mov esi, dword [esp + 0x18]
push str.out_of_memory
push str.Could_not_resolve_host:__s
call fcn.004206e4
pop ecx
pop ecx
jmp 0x42d1e2
push dword [ebp + 0x330]
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea ebx, [edi + 8]
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x42d138
cmp ebx, 0xffffffff
je 0x42d1cc
mov ebx, dword [ebp + 0x330]
cmp ebx, 0x2afc
je 0x42d1cc
cmp byte [ebp + 0x32c], 0
je 0x42d1df
mov eax, ebp
call fcn.0042917c
mov esi, dword [esp + 0x18]
push eax
push dword [ebp + 0x34]
push str.Could_not_resolve_host:__s___s
call fcn.004206e4
add esp, 0xc
push 6
jmp 0x42d1e1
push dword [ebp + 0x34]
mov esi, dword [esp + 0x1c]
push str.Resolving_host_timed_out:__s
call fcn.004206e4
pop ecx
pop ecx
push 0x1c
pop edi
lea eax, [ebp + 0x320]
push eax
call fcn.0042ce84
cmp dword [ebp + 0x328], 0
pop ecx
jne 0x42d1ff
mov byte [ebp + 0xe4], 1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x42d276
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push dword [ebp + 8]
mov esi, dword [edi]
mov ebx, eax
and dword [ebx], 0
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
push dword [ebp + 0xc]
push dword [ebp + 8]
je 0x42d2a1
push eax
call fcn.004344e8
add esp, 0xc
jmp 0x42d315
push edi
call fcn.0042cf3d
add esp, 0xc
test al, al
je 0x42d2b8
mov dword [ebx], 1
xor eax, eax
jmp 0x42d315
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, edi
call fcn.0042917c
push eax
push dword [ebp + 8]
push str.init_resolve_thread___failed_for__s___s_n
call fcn.0042067b
add esp, 0xc
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x42d30a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov eax, edi
call fcn.0042917c
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.gethostbyname_2__failed_for__s:_d___s_n
call fcn.0042067b
add esp, 0x10
jmp 0x42d2b4
push dword [ebp + 0xc]
mov ebx, eax
call fcn.00434553
pop ecx
pop esi
pop ebx
pop ebp
ret

Function at 0x42d407
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x480244]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebx]
push edi
mov edi, dword [ebx + 0xa4]
mov dword [ebp - 0x18], edi
call fcn.0042a949
push edx
push eax
call fcn.0042a949
push edx
push eax
call fcn.0042a960
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, dword [esi + 0x9c]
add esp, 0x10
test ecx, ecx
jne 0x42d456
mov ecx, dword [esi + 0x98]
test ecx, ecx
je 0x42d472
sub ecx, eax
test ecx, ecx
jg 0x42d46e
push str.Timed_out_before_server_could_connect_to_us
call fcn.004206e4
pop ecx
push 0x1c
jmp 0x42d507
mov eax, ecx
jmp 0x42d475
push 0x3c
pop eax
imul eax, eax, 0x3e8
push edi
or edi, 0xffffffff
call fcn.00429c68
or edi, 0xffffffff
cmp eax, edi
pop ecx
je 0x42d4fa
test eax, eax
je 0x42d4f3
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x42d4bf
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0xffffffff
jne 0x42d4d4
push str.Error_accept__ing_server_connect
jmp 0x42d4ff
push str.Connection_accepted_from_server_n
call fcn.0042067b
pop ecx
xor eax, eax
push edi
inc eax
mov dword [ebx + 0xa4], edi
call fcn.00428599
pop ecx
xor eax, eax
jmp 0x42d508
push str.Timeout_while_waiting_for_server_connect
jmp 0x42d4ff
push str.Error_while_waiting_for_server_connect
call fcn.004206e4
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00437538
leave
ret
Function at 0x42e97d
Capabilities:
Check http status code

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push esi
push 0x64
cdq
pop ecx
idiv ecx
mov esi, dword [edi]
xor ebx, ebx
cmp eax, 2
je 0x42e9a3
push str.Couldnt_set_desired_mode
call fcn.004206e4
pop ecx
push 0x11
pop eax
jmp 0x42e9fb
cmp dword [esp + 0x10], 0xc8
je 0x42e9bd
push dword [esp + 0x10]
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
call fcn.0042067b
pop ecx
pop ecx
mov eax, dword [esp + 0x14]
cmp eax, 0x10
jne 0x42e9cf
mov eax, edi
call fcn.0042e051
jmp 0x42e9f7
cmp eax, 0x11
jne 0x42e9dd
mov esi, edi
call fcn.0042e08b
jmp 0x42e9f7
cmp eax, 0x12
jne 0x42e9eb
mov eax, edi
call fcn.0042e0cc
jmp 0x42e9f7
cmp eax, 0x13
jne 0x42e9f9
mov eax, edi
call fcn.0042e0da
mov ebx, eax
mov eax, ebx
pop esi
pop ebx
pop ecx
ret
Function at 0x4312af
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, eax
mov ebx, dword [edi + 0x16c]
push 0x5c
push dword [ebx]
call fcn.00456860
mov esi, dword [edi]
and dword [ebp - 0x10], 0
and dword [ebp - 0xc], 0
pop ecx
pop ecx
mov dword [ebp - 8], eax
call fcn.0042a949
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x80]
mov dword [edi + 0x200], eax
mov eax, dword [esi + 0x28]
mov dword [edi + 0x204], eax
lea eax, [esi + 0x2f4]
mov dword [edi + 0x1fc], eax
mov eax, dword [ebp - 8]
test eax, eax
mov dword [ebp - 0x14], edx
jne 0x431313
push 0x25
pop eax
jmp 0x4313f1
cmp byte [eax + 1], 0
je 0x43130b
push 0x477d28
push dword [ebx]
call fcn.004607a8
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 8], eax
jne 0x431340
push dword [ebx]
push str.Cant_open__s_for_writing
call fcn.004206e4
pop ecx
pop ecx
push 0x17
jmp 0x43130d
mov eax, dword [esi + 0xa8]
cmp eax, 0xffffffff
mov ecx, dword [esi + 0xac]
jne 0x431355
cmp ecx, eax
je 0x431360
push ecx
push eax
mov eax, esi
call fcn.0042a2ef
pop ecx
pop ecx
push 0x4000
lea ecx, [ebp - 4]
call fcn.00420a72
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x4313e6
cmp dword [ebp - 4], eax
jbe 0x4313d4
push dword [ebp - 8]
lea eax, [esi + 0x2f4]
push dword [ebp - 4]
push 1
push eax
call fcn.004600fd
mov ecx, dword [ebp - 4]
add esp, 0x10
cmp eax, ecx
jne 0x4313d1
add dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x200], eax
adc dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
mov ecx, edi
mov dword [esi + 0x204], eax
call fcn.0042a31d
test eax, eax
jne 0x4313e3
push dword [ebp - 0x14]
mov eax, esi
push dword [ebp - 0x18]
call fcn.004296e0
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x431360
jmp 0x4313e6
push 0x37
pop ebx
test ebx, ebx
jne 0x4313e6
mov ecx, edi
call fcn.0042a31d
test eax, eax
je 0x4313e6
push 0x2a
pop ebx
push dword [ebp - 8]
call fcn.0045cc06
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x431e5f
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x480244]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x198]
push eax
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x431e96
push eax
push str.WSAStartup_failed___d_
call fcn.004206e4
pop ecx
jmp 0x431ebc
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp byte [ebp - 0x198], 2
jne 0x431eb2
cmp byte [ebp - 0x197], 0
jne 0x431eb2
xor eax, eax
jmp 0x431ec0
push str.insufficient_winsock_version_to_support_telnet
call fcn.004206e4
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00437538
leave
ret