joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002db70
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
cmp ecx, dword [esi + 0xa4]
sete al
cmp byte [eax + esi + 0xb0], 0
je 0x1002dba4
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push esi
call fcn.10024b7c
add esp, 0x10
mov edi, eax
jmp 0x1002dbef
cmp dword [esi + 0x168], 0
je 0x1002dbb2
or edi, 0xffffffff
jmp 0x1002dbc8
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
call dword [sym.imp.WSOCK32.dll_send]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1002dbef
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x2733
jne 0x1002dbd8
xor edi, edi
jmp 0x1002dbef
push eax
push esi
call fcn.1002459e
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.1002da56
add esp, 0x14
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
xor eax, eax
cmp edi, 0xffffffff
pop edi
sete al
dec eax
pop esi
and al, 0xc9
add eax, 0x37
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
xor ecx, ecx
cmp esi, dword [eax + 0xa4]
push edi
mov edi, dword [ebp + 0x18]
sete cl
xor edx, edx
mov dword [edi], edx
cmp byte [ecx + eax + 0xb0], dl
je 0x1002dcc0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
push eax
call fcn.10024b7f
mov esi, eax
add esp, 0x10
cmp esi, 0xffffffff
jmp 0x1002dcee
mov dword [edi], edx
cmp dword [eax + 0x168], edx
je 0x1002dccf
or esi, 0xffffffff
jmp 0x1002dce4
push edx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.WSOCK32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1002dcf5
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x2733
jne 0x1002dcf5
or eax, 0xffffffff
jmp 0x1002dcf9
mov dword [edi], esi
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x1002ddd3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x88]
test eax, eax
je 0x1002ddf8
push dword [esi + 0x14]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call eax
add esp, 0x14
jmp 0x1002de2e
mov eax, dword [ebp + 0xc]
test eax, eax
jl 0x1002de2c
cmp eax, 2
jg 0x1002de2c
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
push dword [esi + 0x10]
push 1
push 2
push dword [eax*4 + 0x100911e0]
call edi
push dword [esi + 0x10]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call edi
add esp, 0x20
pop edi
xor eax, eax
pop esi
pop ebp
ret
Function at 0x10030bde
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push 0x64
mov esi, dword [ebp + 8]
cdq
pop ebx
mov ecx, dword [esi]
idiv ebx
xor edi, edi
cmp eax, 2
je 0x10030c0b
push str.Couldnt_set_desired_mode
push ecx
call fcn.1002da56
pop ecx
pop ecx
push 0x11
pop eax
jmp 0x10030c5f
cmp dword [ebp + 0xc], 0xc8
je 0x10030c25
push dword [ebp + 0xc]
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ecx
call fcn.1002d9fc
add esp, 0xc
mov eax, dword [ebp + 0x10]
cmp eax, 0x10
jne 0x10030c35
push esi
call fcn.1002ff9d
jmp 0x10030c5a
cmp eax, 0x11
jne 0x10030c42
push esi
call fcn.10030c64
jmp 0x10030c5a
cmp eax, 0x12
jne 0x10030c4f
push esi
call fcn.10030ca8
jmp 0x10030c5a
cmp eax, 0x13
jne 0x10030c5d
push esi
call fcn.10030cb9
pop ecx
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
mov ebx, dword [edi + 0xa4]
call fcn.1002e62a
push edx
push eax
call fcn.1002e62a
push edx
push eax
call fcn.1002e671
cdq
mov ecx, 0x3e8
add esp, 0x10
idiv ecx
mov ecx, dword [esi + 0x9c]
test ecx, ecx
jne 0x10031058
mov ecx, dword [esi + 0x98]
test ecx, ecx
je 0x10031076
sub ecx, eax
test ecx, ecx
jg 0x10031072
push str.Timed_out_before_server_could_connect_to_us
push esi
call fcn.1002da56
pop ecx
pop ecx
push 0x1c
jmp 0x10031110
mov eax, ecx
jmp 0x10031079
push 0x3c
pop eax
imul eax, eax, 0x3e8
push eax
push 0xffffffffffffffff
push ebx
call fcn.100375ec
add esp, 0xc
cmp eax, 0xffffffff
je 0x10031101
test eax, eax
je 0x100310fa
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
mov dword [ebp + 8], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x100310c4
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_accept]
mov dword [ebp - 4], eax
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov ebx, dword [ebp - 4]
cmp ebx, 0xffffffff
jne 0x100310da
push str.Error_accept__ing_server_connect
jmp 0x10031106
push str.Connection_accepted_from_server_n
push esi
call fcn.1002d9fc
push 1
push ebx
mov dword [edi + 0xa4], ebx
call fcn.1003795a
add esp, 0x10
xor eax, eax
jmp 0x10031111
push str.Timeout_while_waiting_for_server_connect
jmp 0x10031106
push str.Error_while_waiting_for_server_connect
push esi
call fcn.1002da56
pop ecx
pop ecx
push 0x1e
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10032b17
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 4], str.octet
mov eax, dword [esi + 0xc]
mov edi, dword [eax]
mov ebx, dword [eax + 0x50]
cmp byte [edi + 0x184], 0
je 0x10032b40
mov dword [ebp - 4], str.netascii
mov eax, dword [ebp + 0xc]
push 3
sub eax, 0
pop ecx
je 0x10032bbc
sub eax, ecx
je 0x10032b90
dec eax
je 0x10032b6a
dec eax
je 0x10032bce
dec eax
je 0x10032bbc
push str.tftp_send_first:_internal_error_n
push edi
call fcn.1002da56
pop ecx
pop ecx
jmp 0x10032caf
push str.Connected_for_transmit
push 0x100b29c0
push edi
call fcn.1002d9fc
push esi
mov dword [esi], 2
call fcn.10032741
push 4
push esi
call fcn.10032e42
jmp 0x10032bb4
push str.Connected_for_receive
push 0x100b29c0
push edi
call fcn.1002d9fc
push esi
mov dword [esi], 1
call fcn.10032741
push 3
push esi
call fcn.10032cb4
add esp, 0x18
jmp 0x10032caf
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x1c]
jle 0x10032bd5
mov dword [esi + 8], 9
mov dword [esi], ecx
jmp 0x10032caf
cmp byte [edi + 0x191], 0
je 0x10032c30
push 2
call dword [sym.imp.WSOCK32.dll_htons]
push ebx
mov word [esi + 0x260], ax
call sub.MSVCRT.dll_strlen
push eax
push ebx
call fcn.1003750f
mov ecx, dword [esi + 0xc]
mov ebx, eax
lea eax, [esi + 0x264]
add esp, 0xc
mov dword [ecx + 0x1fc], eax
mov eax, dword [edi + 0xa8]
mov ecx, dword [edi + 0xac]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x10032c3f
push ecx
push eax
push edi
call fcn.1002e884
add esp, 0xc
jmp 0x10032c3f
push 1
call dword [sym.imp.WSOCK32.dll_htons]
mov word [esi + 0x260], ax
push 0
lea eax, [esi + 0x262]
push dword [ebp - 4]
push 0
push ebx
push str._s_c_s_c
push eax
call fcn.1002c619
push ebx
call sub.MSVCRT.dll_strlen
push dword [ebp - 4]
mov ebx, eax
call sub.MSVCRT.dll_strlen
lea ecx, [ebx + eax + 4]
mov eax, dword [esi + 0xc]
add esp, 0x20
mov eax, dword [eax + 0x10]
push dword [eax + 0x10]
push dword [eax + 0x14]
lea eax, [esi + 0x260]
push 0
push ecx
push eax
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x10032caf
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCRT.dll_strerror]
push eax
push 0x100b29c0
push edi
call fcn.1002da56
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10032cb4
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 3
mov eax, dword [esi + 0xc]
pop edi
mov ebx, dword [eax]
mov eax, dword [ebp + 0xc]
sub eax, edi
mov dword [ebp + 8], ebx
je 0x10032d61
dec eax
dec eax
je 0x10032d15
dec eax
je 0x10032cf2
push str.tftp_rx:_internal_error
push 0x100b29c0
push ebx
call fcn.1002da56
add esp, 0xc
jmp 0x10032e1f
inc dword [esi + 0x14]
push dword [esi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.1002d9fc
mov eax, dword [esi + 0x14]
add esp, 0xc
cmp eax, dword [esi + 0x1c]
jle 0x10032d1c
mov dword [esi + 8], 8
mov dword [esi], edi
jmp 0x10032e1f
push dword [esi + 0x50]
lea eax, [esi + 0x40]
push eax
push 0
lea eax, [esi + 0x260]
push 4
push eax
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x10032e1f
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCRT.dll_strerror]
push eax
push 0x100b29c0
push ebx
call fcn.1002da56
add esp, 0x10
jmp 0x10032e1f
mov ax, word [esi + 0x5e]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
movzx edi, ax
movzx eax, word [esi + 0x28]
inc eax
cmp eax, edi
je 0x10032da8
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebx
call fcn.1002d9fc
add esp, 0xc
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x1c]
jle 0x10032da8
movzx eax, word [esi + 0x28]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
push ebx
call fcn.1002da56
jmp 0x10032e3a
and dword [esi + 0x14], 0
mov word [esi + 0x28], di
mov edi, dword [sym.imp.WSOCK32.dll_htons]
push 4
lea ebx, [esi + 0x260]
call edi
mov word [ebx], ax
mov ax, word [esi + 0x28]
push eax
call edi
push dword [esi + 0x50]
mov word [esi + 0x262], ax
lea eax, [esi + 0x40]
push eax
push 0
push 4
push ebx
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x10032e09
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCRT.dll_strerror]
push eax
push 0x100b29c0
push dword [ebp + 8]
call fcn.1002da56
add esp, 0x10
xor eax, eax
cmp dword [esi + 0x54], 0x204
mov ebx, dword [ebp + 8]
setge al
dec eax
and eax, 2
inc eax
mov dword [esi], eax
movzx eax, word [esi + 0x28]
cdq
push 0
push 0x200
push edx
push eax
call fcn.1008bdd0
push edx
push eax
push ebx
call fcn.1002e820
add esp, 0xc
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x10032e42
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov eax, dword [esi + 0xc]
mov ebp, dword [eax]
mov eax, dword [esp + 0x18]
sub eax, 4
je 0x10032ec0
dec eax
je 0x10032e99
dec eax
je 0x10032e76
push str.tftp_tx:_internal_error
push 0x100b29c0
push ebp
call fcn.1002da56
add esp, 0xc
jmp 0x10032fa5
inc dword [esi + 0x14]
push dword [esi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebp
call fcn.1002d9fc
mov eax, dword [esi + 0x14]
add esp, 0xc
cmp eax, dword [esi + 0x1c]
jle 0x10032ea4
mov dword [esi + 8], 8
mov dword [esi], 3
jmp 0x10032fa5
push dword [esi + 0x50]
lea eax, [esi + 0x40]
push eax
mov eax, dword [esi + 0x58]
add eax, 4
push 0
push eax
lea eax, [esi + 0x260]
push eax
jmp 0x10032f7b
mov ax, word [esi + 0x5e]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
movzx ecx, ax
mov ax, word [esi + 0x28]
movzx edx, ax
cmp ecx, edx
je 0x10032f15
push edx
push ecx
push str.Received_ACK_for_block__d__expecting__d_n
push ebp
call fcn.1002d9fc
add esp, 0x10
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x1c]
jle 0x10032fc3
movzx eax, word [esi + 0x28]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push 0x100b29c0
push ebp
call fcn.1002da56
add esp, 0x10
jmp 0x10032fc3
mov edi, dword [sym.imp.WSOCK32.dll_htons]
and dword [esi + 0x14], 0
inc eax
push 3
mov word [esi + 0x28], ax
lea ebx, [esi + 0x260]
call edi
mov word [ebx], ax
mov ax, word [esi + 0x28]
push eax
call edi
cmp word [esi + 0x28], 1
mov word [esi + 0x262], ax
jbe 0x10032f57
cmp dword [esi + 0x58], 0x200
jge 0x10032f57
mov dword [esi], 3
jmp 0x10032fc3
lea edi, [esi + 0x58]
push edi
push 0x200
push dword [esi + 0xc]
call fcn.10028380
add esp, 0xc
lea eax, [esi + 0x40]
push dword [esi + 0x50]
push eax
mov eax, dword [edi]
add eax, 4
push 0
push eax
push ebx
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x10032fa5
call dword [sym.imp.MSVCRT.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCRT.dll_strerror]
push eax
push 0x100b29c0
push ebp
call fcn.1002da56
add esp, 0x10
movzx eax, word [esi + 0x28]
cdq
push 0
push 0x200
push edx
push eax
call fcn.1008bdd0
push edx
push eax
push ebp
call fcn.1002e839
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x1003331b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x5c
mov ebx, dword [edi + 0x16c]
push dword [ebx]
call dword [sym.imp.MSVCRT.dll_strchr]
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.1002e62a
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 + 0x2ec]
mov dword [edi + 0x1fc], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 0x14], edx
jne 0x1003337d
push 0x25
jmp 0x100333ab
cmp byte [eax + 1], 0
je 0x10033379
push 0x100af31c
push dword [ebx]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
jne 0x100333b1
push dword [ebx]
push str.Cant_open__s_for_writing
push esi
call fcn.1002da56
add esp, 0xc
push 0x17
pop eax
jmp 0x10033467
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xac]
cmp eax, 0xffffffff
jne 0x100333c6
cmp ecx, eax
je 0x100333d1
push ecx
push eax
push esi
call fcn.1002e884
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 0x4000
push edi
call fcn.10028380
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1003345b
mov eax, dword [ebp - 4]
test eax, eax
mov dword [ebp - 8], eax
jbe 0x10033449
push dword [ebp + 8]
push eax
lea eax, [esi + 0x2ec]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [ebp - 8]
add esp, 0x10
cmp eax, ecx
jne 0x10033446
add dword [ebp - 0x10], ecx
adc dword [ebp - 0xc], ebx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push esi
call fcn.1002e839
push edi
call fcn.1002e8b6
add esp, 0x10
test eax, eax
jne 0x10033458
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push esi
call fcn.10038138
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1003345b
jmp 0x100333d1
push 0x37
pop ebx
test ebx, ebx
jne 0x1003345b
push edi
call fcn.1002e8b6
test eax, eax
pop ecx
je 0x1003345b
push 0x2a
pop ebx
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1003429b
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
lea eax, [ebp - 0x190]
push eax
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x100342ca
push eax
push str.WSAStartup_failed___d_
push dword [ebp + 8]
call fcn.1002da56
add esp, 0xc
jmp 0x100342f8
call dword [sym.imp.WSOCK32.dll_WSACleanup]
cmp byte [ebp - 0x190], 2
jne 0x100342e9
xor eax, eax
mov al, byte [ebp - 0x18f]
test al, al
jne 0x100342e9
xor eax, eax
leave
ret
push str.insufficient_winsock_version_to_support_telnet
push dword [ebp + 8]
call fcn.1002da56
pop ecx
pop ecx
push 2
pop eax
leave
ret
Function at 0x10034434
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
mov al, byte [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
or byte [ebp - 4], 0xff
push esi
mov esi, dword [ebp + 8]
mov byte [ebp - 2], al
push 0
lea eax, [ebp - 4]
push 3
push eax
mov byte [ebp - 3], bl
push dword [esi + 0xa0]
call dword [sym.imp.WSOCK32.dll_send]
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.10034478
add esp, 0x10
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x908
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, dword [ebx + 0x16c]
mov eax, dword [ebx]
mov dword [ebp - 4], eax
mov ecx, dword [esi + 0x1ab0]
sub ecx, dword [esi + 0x1aac]
inc ecx
inc ecx
push ecx
lea ecx, [esi + 0x18ac]
push ecx
push 0x3c
push eax
call fcn.10034e8e
mov eax, dword [esi + 0x1aac]
add esp, 0x10
movzx ecx, byte [eax]
inc eax
cmp ecx, 0x18
mov dword [esi + 0x1aac], eax
je 0x10034e16
cmp ecx, 0x23
je 0x10034dee
cmp ecx, 0x27
jne 0x10034e89
push 0
push ecx
mov edi, 0xff
push 0xfa
push edi
push str._c_c_c_c
lea eax, [ebp - 0x908]
push 0x800
push eax
call fcn.1002c4bf
mov esi, dword [esi + 0x18a8]
add esp, 0x1c
push 4
pop ebx
test esi, esi
je 0x10034da7
push dword [esi]
call sub.MSVCRT.dll_strlen
inc eax
pop ecx
add eax, ebx
cmp eax, 0x7fa
mov dword [ebp - 8], eax
jae 0x10034da2
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x108]
push eax
push str._127_____127s
push dword [esi]
call dword [sym.imp.MSVCRT.dll_sscanf]
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x108]
push 1
push eax
mov eax, 0x800
push 0
sub eax, ebx
push str._c_s_c_s
push eax
lea eax, [ebp + ebx - 0x908]
push eax
call fcn.1002c4bf
mov ebx, dword [ebp - 8]
add esp, 0x2c
mov esi, dword [esi + 4]
jmp 0x10034d3c
mov eax, 0x800
push 0xf0
push edi
sub eax, ebx
push 0x100b4420
push eax
lea eax, [ebp + ebx - 0x908]
push eax
call fcn.1002c4bf
add esp, 0x14
inc ebx
inc ebx
lea eax, [ebp - 0x908]
push 0
push ebx
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0xa0]
call dword [sym.imp.WSOCK32.dll_send]
add ebx, 0xfffffffe
push ebx
jmp 0x10034e75
add esi, 0x1828
push esi
mov dword [ebp + 8], esi
call sub.MSVCRT.dll_strlen
mov edi, 0xff
push 0xf0
push edi
mov esi, eax
push dword [ebp + 8]
add esi, 6
push 0
push 0x23
jmp 0x10034e3c
add esi, 0x1808
push esi
mov dword [ebp + 8], esi
call sub.MSVCRT.dll_strlen
mov edi, 0xff
push 0xf0
push edi
mov esi, eax
push dword [ebp + 8]
add esi, 6
push 0
push 0x18
push 0xfa
push edi
push str._c_c_c_c_s_c_c
lea eax, [ebp - 0x908]
push 0x800
push eax
call fcn.1002c4bf
add esp, 0x2c
lea eax, [ebp - 0x908]
push 0
push esi
push eax
push dword [ebx + 0xa0]
call dword [sym.imp.WSOCK32.dll_send]
add esi, 0xfffffffe
push esi
lea eax, [ebp - 0x906]
push eax
push 0x3e
push dword [ebp - 4]
call fcn.10034e8e
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100375ec
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
push esi
mov esi, ecx
cdq
idiv esi
xor esi, esi
push edi
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x210], esi
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
cdq
idiv ecx
mov eax, dword [ebp + 8]
imul edx, edx, 0x3e8
mov dword [ebp - 4], edx
or edx, 0xffffffff
cmp eax, 0xffffffff
je 0x1003764e
push 1
mov dword [ebp - 0x20c], eax
pop ecx
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x10c], ecx
mov edx, eax
jmp 0x10037651
push 1
pop ecx
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x314], esi
cmp edi, 0xffffffff
je 0x100376af
xor eax, eax
cmp dword [ebp - 0x10c], esi
mov dword [ebp - 0x310], edi
mov dword [ebp - 0x314], ecx
jbe 0x1003768b
lea ecx, [ebp - 0x108]
cmp dword [ecx], edi
je 0x1003768b
inc eax
add ecx, 4
cmp eax, dword [ebp - 0x10c]
jb 0x1003767b
cmp eax, dword [ebp - 0x10c]
jne 0x100376a9
cmp dword [ebp - 0x10c], 0x40
jae 0x100376a9
mov dword [ebp + eax*4 - 0x108], edi
inc dword [ebp - 0x10c]
cmp edi, edx
jbe 0x100376af
mov edx, edi
push ebx
lea ebx, [edx + 1]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_select]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100376e4
call sub.KERNEL32.dll_GetLastError
cmp eax, 4
je 0x100376b3
test esi, esi
pop ebx
jge 0x100376ee
or eax, 0xffffffff
jmp 0x10037757
jne 0x100376f4
xor eax, eax
jmp 0x10037757
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
je 0x10037728
lea eax, [ebp - 0x210]
push eax
push dword [ebp + 8]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10037712
push 1
pop esi
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10037728
or esi, 4
cmp edi, 0xffffffff
je 0x10037755
lea eax, [ebp - 0x314]
push eax
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10037741
or esi, 2
lea eax, [ebp - 0x10c]
push eax
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10037755
or esi, 4
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x10037c3a
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebx]
push dword [esi + 0xc]
push dword [ebx + 0x28]
push dword [esi + 4]
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x10037db4
mov eax, dword [ebp + 0x14]
push 0x80
and byte [eax], 0
lea eax, [ebp - 0x80]
push eax
push esi
call fcn.10024be3
lea eax, [ebp - 0x80]
push eax
push str.__Trying__s...
push edi
call fcn.1002d9fc
add esp, 0x18
cmp byte [edi + 0x1ae], 0
je 0x10037ca4
push dword [ebp + 8]
push ebx
call fcn.10037f65
pop ecx
pop ecx
mov eax, dword [ebx]
cmp dword [eax + 0x74], 0
je 0x10037cbf
push dword [ebp + 8]
push ebx
call fcn.10037dbc
pop ecx
test eax, eax
pop ecx
jne 0x10037dab
push 1
push dword [ebp + 8]
call fcn.1003795a
cmp dword [ebx + 0x28], 1
pop ecx
pop ecx
jne 0x10037ce4
push dword [esi + 0x10]
push dword [esi + 0x14]
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.dll_connect]
mov esi, eax
jmp 0x10037ce6
xor esi, esi
cmp esi, 0xffffffff
jne 0x10037d3a
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb
mov dword [ebp + 0xc], eax
je 0x10037d2b
cmp eax, 0x2732
jle 0x10037d06
cmp eax, 0x2734
jle 0x10037d2b
push eax
push ebx
call fcn.1002459e
push eax
lea eax, [ebp - 0x80]
push eax
push str.Failed_to_connect_to__s:__s
push edi
call fcn.1002da56
mov eax, dword [ebp + 0xc]
add esp, 0x18
mov dword [edi + 0x8310], eax
jmp 0x10037d48
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.10037b63
pop ecx
mov esi, eax
pop ecx
cmp esi, 1
jne 0x10037d48
cmp dword [edi + 0x2d0], 2
je 0x10037d71
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.10037b8e
pop ecx
test esi, esi
pop ecx
jne 0x10037d76
test al, al
je 0x10037d8a
mov eax, dword [ebp + 0x14]
push str.connected_n
push edi
mov byte [eax], 1
call fcn.1002d9fc
pop ecx
pop ecx
mov eax, dword [ebp + 8]
jmp 0x10037db7
cmp esi, 1
jne 0x10037d8a
push str.Timeout_n
push edi
call fcn.1002d9fc
pop ecx
pop ecx
jmp 0x10037dab
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x8310], eax
push dword [ebp + 0xc]
push ebx
call fcn.1002459e
push eax
push 0x100b29c0
push edi
call fcn.1002d9fc
add esp, 0x14
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret