joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4195d8
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x44c038]
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.0041d4a9
push edx
push eax
call fcn.0041d4a9
push edx
push eax
call fcn.0041d4cf
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, dword [esi + 0x9c]
add esp, 0x10
test ecx, ecx
jne 0x419627
mov ecx, dword [esi + 0x98]
test ecx, ecx
je 0x419643
sub ecx, eax
test ecx, ecx
jg 0x41963f
push str.Timed_out_before_server_could_connect_to_us
call fcn.00410a0f
pop ecx
push 0x1c
jmp 0x4196d8
mov eax, ecx
jmp 0x419646
push 0x3c
pop eax
imul eax, eax, 0x3e8
push edi
or edi, 0xffffffff
call fcn.0041d354
or edi, 0xffffffff
cmp eax, edi
pop ecx
je 0x4196cb
test eax, eax
je 0x4196c4
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 0x419690
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 0x4196a5
push str.Error_accept__ing_server_connect
jmp 0x4196d0
push str.Connection_accepted_from_server_n
call fcn.004109a6
pop ecx
xor eax, eax
push edi
inc eax
mov dword [ebx + 0xa4], edi
call fcn.00418681
pop ecx
xor eax, eax
jmp 0x4196d9
push str.Timeout_while_waiting_for_server_connect
jmp 0x4196d0
push str.Error_while_waiting_for_server_connect
call fcn.00410a0f
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00425c5a
leave
ret
Function at 0x41ab19
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 0x41ab3f
push str.Couldnt_set_desired_mode
call fcn.00410a0f
pop ecx
push 0x11
pop eax
jmp 0x41ab9a
cmp dword [esp + 0x10], 0xc8
je 0x41ab59
push dword [esp + 0x10]
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
call fcn.004109a6
pop ecx
pop ecx
mov eax, dword [esp + 0x14]
cmp eax, 0x10
jne 0x41ab6b
mov eax, edi
call fcn.0041a209
jmp 0x41ab96
cmp eax, 0x11
jne 0x41ab79
mov esi, edi
call fcn.0041a243
jmp 0x41ab96
cmp eax, 0x12
jne 0x41ab84
push 1
push 0xa
jmp 0x41ab8d
cmp eax, 0x13
jne 0x41ab98
push 1
push 0xb
pop ebx
mov eax, edi
call fcn.0041a4cc
pop ecx
mov ebx, eax
mov eax, ebx
pop esi
pop ebx
pop ecx
ret
Function at 0x41d354
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 0x41d3a9
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 0x41d400
xor eax, eax
cmp dword [ebp - 0x114], esi
mov dword [ebp - 0x320], edi
mov dword [ebp - 0x324], edx
jbe 0x41d3dc
cmp dword [ebp + eax*4 - 0x110], edi
je 0x41d3dc
inc eax
cmp eax, dword [ebp - 0x114]
jb 0x41d3ca
cmp eax, dword [ebp - 0x114]
jne 0x41d3fa
cmp dword [ebp - 0x114], 0x40
jae 0x41d3fa
mov dword [ebp + eax*4 - 0x110], edi
inc dword [ebp - 0x114]
cmp edi, ecx
jbe 0x41d400
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 0x41d435
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 4
je 0x41d403
test esi, esi
jge 0x41d43e
or eax, 0xffffffff
jmp 0x41d4a5
jne 0x41d444
xor eax, eax
jmp 0x41d4a5
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
je 0x41d476
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d460
inc esi
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d476
or esi, 4
cmp edi, 0xffffffff
je 0x41d4a3
lea eax, [ebp - 0x324]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d48f
or esi, 2
lea eax, [ebp - 0x114]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d4a3
or esi, 4
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x41d578
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x44c038]
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 0x41d5af
push eax
push str.WSAStartup_failed___d_
call fcn.00410a0f
pop ecx
jmp 0x41d5d5
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp byte [ebp - 0x198], 2
jne 0x41d5cb
cmp byte [ebp - 0x197], 0
jne 0x41d5cb
xor eax, eax
jmp 0x41d5d9
push str.insufficient_winsock_version_to_support_telnet
call fcn.00410a0f
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00425c5a
leave
ret
Function at 0x41dd9e
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x890]
sub esp, 0x910
mov eax, dword [0x44c038]
xor eax, ebp
mov dword [ebp + 0x88c], eax
push ebx
mov ebx, ecx
mov ecx, dword [ebx]
push esi
mov esi, dword [ebx + 0x16c]
mov eax, dword [esi + 0x1ab0]
sub eax, dword [esi + 0x1aac]
push edi
inc eax
inc eax
push eax
lea eax, [esi + 0x18ac]
push 0x3c
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x7c], ecx
call fcn.0041d9ba
mov eax, dword [esi + 0x1aac]
pop ecx
pop ecx
movzx ecx, byte [eax]
inc eax
cmp ecx, 0x18
mov dword [esi + 0x1aac], eax
je 0x41df07
cmp ecx, 0x23
je 0x41dee6
cmp ecx, 0x27
jne 0x41df6d
push 0
push ecx
push 0xfa
mov edi, 0xff
push edi
push str._c_c_c_c
lea eax, [ebp - 0x74]
push 0x800
push eax
call fcn.004184dc
mov esi, dword [esi + 0x18a8]
add esp, 0x1c
push 4
pop ebx
jmp 0x41dea5
push dword [esi]
call fcn.00426560
inc eax
add eax, ebx
cmp eax, 0x7fa
pop ecx
mov dword [ebp - 0x80], eax
jae 0x41dea2
lea eax, [ebp + 0x80c]
push eax
lea eax, [ebp + 0x78c]
push eax
push str._127_____127s
push dword [esi]
call fcn.004359be
lea eax, [ebp + 0x80c]
push eax
push 1
lea eax, [ebp + 0x78c]
push eax
push 0
mov eax, 0x800
sub eax, ebx
push str._c_s_c_s
push eax
lea eax, [ebp + ebx - 0x74]
push eax
call fcn.004184dc
mov ebx, dword [ebp - 0x80]
add esp, 0x2c
mov esi, dword [esi + 4]
test esi, esi
jne 0x41de44
push pe_nt_image_headers32
push edi
mov eax, 0x800
sub eax, ebx
push 0x445d34
push eax
lea eax, [ebp + ebx - 0x74]
push eax
call fcn.004184dc
add esp, 0x14
push esi
inc ebx
inc ebx
push ebx
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x78]
push dword [eax + 0xa0]
call dword [sym.imp.WS2_32.dll_send]
add ebx, 0xfffffffe
push ebx
jmp 0x41df5e
add esi, 0x1828
push esi
mov dword [ebp - 0x78], esi
call fcn.00426560
push pe_nt_image_headers32
mov edi, 0xff
push edi
push esi
push 0
push 0x23
jmp 0x41df26
add esi, 0x1808
push esi
mov dword [ebp - 0x78], esi
call fcn.00426560
push pe_nt_image_headers32
mov edi, 0xff
push edi
push esi
push 0
push 0x18
push 0xfa
push edi
mov esi, eax
push str._c_c_c_c_s_c_c
lea eax, [ebp - 0x74]
push 0x800
push eax
add esi, 6
call fcn.004184dc
add esp, 0x2c
push 0
push esi
lea eax, [ebp - 0x74]
push eax
push dword [ebx + 0xa0]
call dword [sym.imp.WS2_32.dll_send]
add esi, 0xfffffffe
push esi
mov ecx, dword [ebp - 0x7c]
push 0x3e
lea eax, [ebp - 0x72]
call fcn.0041d9ba
pop ecx
pop ecx
mov ecx, dword [ebp + 0x88c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00425c5a
add ebp, 0x890
leave
ret
Function at 0x41e7cc
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0xc]
mov esi, dword [eax]
cmp byte [esi + 0x18c], 0
mov ebx, dword [eax + 0x50]
mov dword [ebp - 4], str.octet
je 0x41e7f5
mov dword [ebp - 4], str.netascii
mov eax, dword [ebp + 8]
sub eax, 0
push 3
pop ecx
je 0x41e86a
sub eax, ecx
je 0x41e847
dec eax
je 0x41e81c
dec eax
je 0x41e87c
dec eax
je 0x41e86a
push str.tftp_send_first:_internal_error_n
call fcn.00410a0f
jmp 0x41e958
push str.Connected_for_transmit
push 0x444690
call fcn.004109a6
mov dword [edi], 2
call fcn.0041e6a8
push 4
mov ebx, edi
call fcn.0041eade
add esp, 0xc
jmp 0x41e959
push str.Connected_for_receive
push 0x444690
call fcn.004109a6
mov dword [edi], 1
call fcn.0041e6a8
push 3
call fcn.0041e95e
jmp 0x41e83f
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
jle 0x41e883
mov dword [edi + 8], 9
mov dword [edi], ecx
jmp 0x41e959
cmp byte [esi + 0x199], 0
je 0x41e8dc
push 2
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [edi + 0x268], ax
call fcn.00426560
pop ecx
mov ecx, ebx
call fcn.0041f9dc
mov ecx, dword [edi + 0xc]
mov ebx, eax
lea eax, [edi + 0x26c]
mov dword [ecx + 0x1fc], eax
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xac]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x41e8eb
push ecx
push eax
mov eax, esi
call fcn.0041ccbf
pop ecx
pop ecx
jmp 0x41e8eb
push 1
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0x268], ax
push 0
push dword [ebp - 4]
lea eax, [edi + 0x26a]
push 0
push ebx
push str._s_c_s_c
push eax
call fcn.00418643
push ebx
call fcn.00426560
add esp, 0x1c
push dword [ebp - 4]
mov ebx, eax
call fcn.00426560
pop ecx
lea ecx, [ebx + eax + 4]
mov eax, dword [edi + 0xc]
mov eax, dword [eax + 0x10]
push dword [eax + 0x10]
push dword [eax + 0x14]
lea eax, [edi + 0x268]
push 0
push ecx
push eax
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41e959
call fcn.0042a428
push dword [eax]
call fcn.0043615a
pop ecx
push eax
push 0x444690
call fcn.00410a0f
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41e95e
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [edi + 0xc]
push ebx
push esi
mov esi, dword [eax]
mov eax, dword [ebp + 8]
push 3
pop ebx
sub eax, ebx
mov dword [ebp - 4], esi
je 0x41ea01
dec eax
dec eax
je 0x41e9b8
dec eax
je 0x41e997
push str.tftp_rx:_internal_error
push 0x444690
call fcn.00410a0f
pop ecx
pop ecx
jmp 0x41eabb
inc dword [edi + 0x14]
push dword [edi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
call fcn.004109a6
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
pop ecx
pop ecx
jle 0x41e9bf
mov dword [edi + 8], 8
mov dword [edi], ebx
jmp 0x41eabb
push dword [edi + 0x58]
lea eax, [edi + 0x48]
push eax
push 0
push 4
lea eax, [edi + 0x268]
push eax
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41eabb
call fcn.0042a428
push dword [eax]
call fcn.0043615a
push eax
push 0x444690
call fcn.00410a0f
add esp, 0xc
jmp 0x41eabb
movzx eax, word [edi + 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
movzx eax, word [edi + 0x30]
inc eax
cmp eax, ebx
je 0x41ea47
push ebx
push str.Received_unexpected_DATA_packet_block__d_n
call fcn.004109a6
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
pop ecx
pop ecx
jle 0x41ea47
movzx eax, word [edi + 0x30]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
call fcn.00410a0f
pop ecx
pop ecx
jmp 0x41eada
mov esi, dword [sym.imp.WS2_32.dll_htons]
and dword [edi + 0x14], 0
mov word [edi + 0x30], bx
push 4
lea ebx, [edi + 0x268]
call esi
mov word [ebx], ax
movzx eax, word [edi + 0x30]
push eax
call esi
push dword [edi + 0x58]
mov word [edi + 0x26a], ax
lea eax, [edi + 0x48]
push eax
push 0
push 4
push ebx
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41eaa6
call fcn.0042a428
push dword [eax]
call fcn.0043615a
mov esi, dword [ebp - 4]
push eax
push 0x444690
call fcn.00410a0f
add esp, 0xc
mov esi, dword [ebp - 4]
xor eax, eax
cmp dword [edi + 0x5c], 0x204
setl al
lea eax, [eax + eax + 1]
mov dword [edi], eax
movzx eax, word [edi + 0x30]
push 0
cdq
push 0x200
push edx
push eax
call fcn.004323d0
mov dword [esi + 0x1f8], eax
mov dword [esi + 0x1fc], edx
pop esi
pop ebx
leave
ret
Function at 0x41eade
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [ebx + 0xc]
push ebp
push esi
mov esi, dword [eax]
mov eax, dword [esp + 0xc]
sub eax, 4
push edi
je 0x41eb46
dec eax
je 0x41eb2c
dec eax
je 0x41eb0b
push str.tftp_tx:_internal_error
push 0x444690
call fcn.00410a0f
pop ecx
pop ecx
jmp 0x41ec28
inc dword [ebx + 0x14]
push dword [ebx + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
call fcn.004109a6
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x1c]
pop ecx
pop ecx
jle 0x41eb37
mov dword [ebx + 8], 8
mov dword [ebx], 3
jmp 0x41ec28
push dword [ebx + 0x58]
lea eax, [ebx + 0x48]
push eax
mov eax, dword [ebx + 0x60]
jmp 0x41ebf4
movzx eax, word [ebx + 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx eax, word [ebx + 0x30]
movzx edx, ax
cmp ecx, edx
je 0x41eb99
push edx
push ecx
push str.Received_ACK_for_block__d__expecting__d_n
call fcn.004109a6
add esp, 0xc
inc dword [ebx + 0x14]
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x1c]
jle 0x41ec47
movzx eax, word [ebx + 0x30]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push 0x444690
call fcn.00410a0f
add esp, 0xc
jmp 0x41ec47
mov edi, dword [sym.imp.WS2_32.dll_htons]
and dword [ebx + 0x14], 0
push 3
pop ebp
inc eax
push ebp
mov word [ebx + 0x30], ax
call edi
mov word [ebx + 0x268], ax
movzx eax, word [ebx + 0x30]
push eax
call edi
cmp word [ebx + 0x30], 1
mov word [ebx + 0x26a], ax
jbe 0x41ebd7
cmp dword [ebx + 0x60], 0x200
jge 0x41ebd7
mov dword [ebx], ebp
jmp 0x41ec47
mov edi, dword [ebx + 0xc]
lea ebp, [ebx + 0x60]
push 0x200
mov ecx, ebp
call fcn.0041454c
pop ecx
push dword [ebx + 0x58]
lea eax, [ebx + 0x48]
push eax
mov eax, dword [ebp]
push 0
add eax, 4
push eax
lea eax, [ebx + 0x268]
push eax
push dword [ebx + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41ec28
call fcn.0042a428
push dword [eax]
call fcn.0043615a
push eax
push 0x444690
call fcn.00410a0f
add esp, 0xc
movzx eax, word [ebx + 0x30]
push 0
cdq
push 0x200
push edx
push eax
call fcn.004323d0
mov dword [esi + 0x200], eax
mov dword [esi + 0x204], edx
pop edi
pop esi
pop ebp
ret
Function at 0x4220f8
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 1
push 0x28
call dword [0x44d1b8]
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 0x42212d
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x422253
mov edi, dword [ebp + 8]
lea eax, [edi + 0x320]
push dword [eax]
mov dword [ebp - 4], eax
call fcn.00410d94
push dword [ebp + 0xc]
call dword [0x44d1b4]
cmp eax, ebx
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jne 0x42215e
push esi
call dword [0x44d1ac]
pop ecx
jmp 0x42211e
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 0x4221a4
push dword [ebp - 4]
call fcn.0042203f
pop ecx
push 0xb
jmp 0x422120
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x18], eax
je 0x422194
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x20], eax
je 0x422194
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x24], eax
je 0x422194
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x1c], eax
je 0x422194
call fcn.0043119e
add eax, 0x40
mov dword [esi + 0x10], eax
lea eax, [esi + 4]
push eax
push ebx
push edi
push 0x421ea9
push ebx
push ebx
call fcn.0042926d
add esp, 0x18
cmp eax, ebx
mov dword [esi], eax
jne 0x42222b
call fcn.0042a428
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 4]
call fcn.0042203f
pop ecx
jmp 0x422126
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 0x422258
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 0x422289
mov eax, dword [eax + 0x98]
test eax, eax
mov ebx, eax
jne 0x422289
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 0x4222e6
push 0x1388
push dword [edi]
call esi
cmp eax, 0x102
jne 0x422331
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 0x422305
mov ecx, dword [ebp + 0x328]
mov dword [eax], ecx
cmp dword [ebp + 0x328], edi
jne 0x42239d
mov ebx, dword [ebx]
push 0x1b
pop edi
cmp ebx, edi
jne 0x42234b
mov esi, dword [esp + 0x18]
push str.out_of_memory
push str.Could_not_resolve_host:__s
call fcn.00410a0f
pop ecx
pop ecx
jmp 0x42239d
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 0x4222f3
cmp ebx, 0xffffffff
je 0x422387
mov ebx, dword [ebp + 0x330]
cmp ebx, 0x2afc
je 0x422387
cmp byte [ebp + 0x32c], 0
je 0x42239a
mov eax, ebp
call fcn.00418ffb
mov esi, dword [esp + 0x18]
push eax
push dword [ebp + 0x34]
push str.Could_not_resolve_host:__s___s
call fcn.00410a0f
add esp, 0xc
push 6
jmp 0x42239c
push dword [ebp + 0x34]
mov esi, dword [esp + 0x1c]
push str.Resolving_host_timed_out:__s
call fcn.00410a0f
pop ecx
pop ecx
push 0x1c
pop edi
lea eax, [ebp + 0x320]
push eax
call fcn.0042203f
cmp dword [ebp + 0x328], 0
pop ecx
jne 0x4223ba
mov byte [ebp + 0xe4], 1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x4223f3
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 0x42241e
push eax
call fcn.00422f0e
add esp, 0xc
jmp 0x422492
push edi
call fcn.004220f8
add esp, 0xc
test al, al
je 0x422435
mov dword [ebx], 1
xor eax, eax
jmp 0x422492
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, edi
call fcn.00418ffb
push eax
push dword [ebp + 8]
push str.init_resolve_thread___failed_for__s___s_n
call fcn.004109a6
add esp, 0xc
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x422487
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov eax, edi
call fcn.00418ffb
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.gethostbyname_2__failed_for__s:_d___s_n
call fcn.004109a6
add esp, 0x10
jmp 0x422431
push dword [ebp + 0xc]
mov ebx, eax
call fcn.00422f79
pop ecx
pop esi
pop ebx
pop ebp
ret
Function at 0x42489a
Capabilities:
Read file on windows

Disassembly:
cmp dword [esi + 8], 0
jne 0x4248bc
mov eax, dword [esi]
push 0x446fa0
push dword [eax + 8]
call fcn.00435f6a
test eax, eax
pop ecx
pop ecx
mov dword [esi + 8], eax
jne 0x4248bc
or eax, 0xffffffff
ret
push edi
push dword [esi + 8]
push dword [esp + 0x10]
push 1
push dword [esp + 0x14]
call fcn.004356a4
mov edi, eax
add esp, 0x10
cmp edi, dword [esp + 0xc]
je 0x4248ed
push dword [esi + 8]
call fcn.004344bf
mov eax, dword [esi]
and dword [esi + 8], 0
mov eax, dword [eax]
pop ecx
mov dword [esi], eax
mov eax, edi
pop edi
ret

Function at 0x424eaa
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x44c038]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00424de9
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00426270
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x424ef9
cmp dword [ebp - 0x1c], 5
jb 0x424f11
jmp 0x424f0d
cmp dword [ebp - 0x10], 1
jne 0x424f11
cmp dword [ebp - 0x1c], 4
ja 0x424f0d
jne 0x424f11
cmp dword [ebp - 0x18], 0
jbe 0x424f11
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x440398
call fcn.004045a8
test eax, eax
jge 0x424f32
mov byte [0x44e830], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00425c5a
add ebp, 0x78
leave
ret

Function at 0x425c5a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x44c038]
jne 0x425c64
repz ret
jmp fcn.0042d1a8

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4270f0
call fcn.0042a43b
mov dword [eax], esi
call fcn.0042a428
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0042695c
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4270cc
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x42711f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042a44e
pop ecx
call fcn.0042a428
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x427146
test al, 1
je 0x427146
test byte [esp + 0xc], 2
je 0x427146
call fcn.0042a43b
mov dword [eax], 5
call fcn.0042a428
mov dword [eax], 0xd
jmp 0x427116
xor eax, eax
pop esi
ret