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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2dc
mov ebx, dword [esp + 0x304]
mov eax, dword [esp + 0x300]
mov ebp, dword [ebx + eax*4 + 0x154]
mov eax, dword [esp + 0x2f8]
mov edi, dword [ebx + 0x138]
mov esi, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp edi, 5
mov dword [esp + 0x54], eax
je 0x42a58a
cmp eax, 0xff
ja 0x42a690
xor eax, eax
cmp edi, 5
sete al
mov dword [esp + 0x58], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.004064d0
test eax, eax
mov edi, eax
js 0x42a6b5
mov dword [esp + 4], 1
mov dword [esp], ebp
call fcn.0040da10
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebp
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0xffffffff
call fcn.0040c5d0
cmp eax, 0xffffffff
je 0x42a6d5
test eax, eax
je 0x42a722
test al, 4
jne 0x42a700
cmp dword [esp + 0x2f0], 1
mov dword [esp + 4], 0
mov dword [esp], ebp
mov byte [esp + 0x78], 5
mov byte [esp + 0x7a], 0
mov byte [esp + 0x7b], 1
mov byte [esp + 0x7c], 2
sbb eax, eax
add eax, 3
mov byte [esp + 0x79], al
call fcn.0040da10
lea eax, [esp + 0x70]
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x10], eax
movzx eax, byte [esp + 0x79]
add eax, 2
mov dword [esp + 0xc], eax
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.0041b7c0
test eax, eax
jne 0x42a670
movzx eax, byte [esp + 0x79]
add eax, 2
cmp eax, dword [esp + 0x70]
je 0x42a744
mov dword [esp], esi
mov dword [esp + 4], str.Unable_to_send_initial_SOCKS5_request.
call fcn.0041b640
add esp, 0x2dc
mov eax, 7
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x54]
mov dword [esp + 4], str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.0041b5c0
mov dword [esp + 0x58], 1
jmp 0x42a596
mov dword [esp + 4], str.Connection_time_out
mov dword [esp], esi
call fcn.0041b640
mov eax, 0x1c
add esp, 0x2dc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.SOCKS5:_no_connection_here
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0041b640
add esp, 0x2dc
mov eax, 7
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.SOCKS5:_error_occurred_during_connection
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0041b640
add esp, 0x2dc
mov eax, 7
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.SOCKS5:_connection_timeout
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0041b640
add esp, 0x2dc
mov eax, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 1
mov dword [esp], ebp
call fcn.0040da10
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebp
call fcn.0040c5d0
cmp eax, 0xffffffff
je 0x42a7b5
test eax, eax
je 0x42a799
test al, 4
je 0x42a7d1
mov dword [esp + 4], str.SOCKS5_read_error_occurred
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0041b640
mov eax, 0x38
jmp 0x42a6ca
mov dword [esp + 4], str.SOCKS5_read_timeout
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0041b640
mov eax, 0x1c
jmp 0x42a6ca
mov dword [esp + 4], str.SOCKS5_nothing_to_read
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
mov dword [esp + 4], 0
mov dword [esp], ebp
call fcn.0040da10
lea eax, [esp + 0x6c]
mov dword [esp + 0xc], 2
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.00429cc0
test eax, eax
jne 0x42a810
cmp dword [esp + 0x6c], 2
je 0x42a82a
mov dword [esp + 4], str.Unable_to_receive_initial_SOCKS5_response.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
cmp byte [esp + 0x78], 5
je 0x42a84b
mov dword [esp + 4], str.Received_invalid_version_in_initial_SOCKS5_response.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
movzx eax, byte [esp + 0x79]
test al, al
je 0x42a886
cmp al, 1
je 0x42accd
cmp al, 2
je 0x42ab44
add al, 1
je 0x42a927
mov dword [esp + 4], str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
cmp dword [esp + 0x58], 0
mov byte [esp + 0x78], 5
mov byte [esp + 0x79], 1
mov byte [esp + 0x7a], 0
jne 0x42ad02
mov edi, dword [esp + 0x54]
mov ecx, dword [esp + 0x2f8]
mov byte [esp + 0x7b], 3
mov eax, edi
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov byte [esp + 0x7c], al
lea eax, [esp + 0x7d]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [edi + 5]
mov edx, dword [esp + 0x2fc]
movzx ecx, byte [esp + 0x2fc]
lea edi, [eax + 2]
sar edx, 8
cmp dword [ebx + 0x5b8], 0
mov byte [esp + eax + 0x78], dl
mov byte [esp + eax + 0x79], cl
je 0x42ab17
mov dword [esp + 4], str.SOCKS5_GSS_API_protection_not_yet_implemented.
mov dword [esp], esi
call fcn.0041b640
cmp edi, dword [esp + 0x70]
je 0x42a957
mov dword [esp + 4], str.Failed_to_send_SOCKS5_connect_request.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
cmp dword [esp + 0x2f0], 0
je 0x42a93d
mov eax, dword [esp + 0x2f0]
cmp byte [eax], 0
jne 0x42a991
mov dword [esp + 4], str.No_authentication_method_was_acceptable.__It_is_quite_likely_that_the_SOCKS5_server_wanted_a_username_password__since_none_was_supplied_to_the_server_on_this_connection._
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
cmp dword [ebx + 0x5b8], 0
je 0x42a9cc
mov dword [esp + 4], str.SOCKS5_GSS_API_protection_not_yet_implemented.
mov dword [esp], esi
call fcn.0041b640
cmp dword [esp + 0x6c], 0xa
je 0x42a9ab
mov dword [esp + 4], str.Failed_to_receive_SOCKS5_connect_request_ack.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
mov dword [esp + 4], str.No_authentication_method_was_acceptable.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
cmp byte [esp + 0x78], 5
je 0x42a9fd
mov dword [esp + 4], str.SOCKS5_reply_has_wrong_version__version_should_be_5.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
lea eax, [esp + 0x6c]
mov dword [esp + 0xc], 0xa
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.00429cc0
test eax, eax
je 0x42a970
jmp 0x42a977
movzx edx, byte [esp + 0x79]
test dl, dl
je 0x42adef
movzx ecx, byte [esp + 0x7b]
cmp cl, 1
je 0x42ad9a
cmp cl, 3
je 0x42ae1b
cmp cl, 4
mov eax, 7
jne 0x42a6ca
mov dword [esp + 0x4c], edx
movzx edx, word [esp + 0x80]
mov dword [esp + 0x54], eax
rol dx, 8
movzx edx, dx
mov dword [esp + 0x48], edx
movzx edx, byte [esp + 0x8b]
mov dword [esp + 0x44], edx
movzx edx, byte [esp + 0x8a]
mov dword [esp + 0x40], edx
movzx edx, byte [esp + 0x89]
mov dword [esp + 0x3c], edx
movzx edx, byte [esp + 0x88]
mov dword [esp + 0x38], edx
movzx edx, byte [esp + 0x87]
mov dword [esp + 0x34], edx
movzx edx, byte [esp + 0x86]
mov dword [esp + 0x30], edx
movzx edx, byte [esp + 0x85]
mov dword [esp + 0x2c], edx
movzx edx, byte [esp + 0x84]
mov dword [esp + 0x28], edx
movzx edx, byte [esp + 0x83]
mov dword [esp + 0x24], edx
movzx edx, byte [esp + 0x82]
mov dword [esp + 0x20], edx
movzx edx, byte [esp + 0x81]
mov dword [esp + 0x1c], edx
movzx edx, byte [esp + 0x80]
mov dword [esp + 0x18], edx
movzx edx, byte [esp + 0x7f]
mov dword [esp + 0x14], edx
movzx edx, byte [esp + 0x7e]
mov dword [esp + 0x10], edx
movzx edx, byte [esp + 0x7d]
mov dword [esp + 4], str.Cant_complete_SOCKS5_connection_to__02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_d.___d_
mov dword [esp], esi
mov dword [esp + 0xc], edx
movzx edx, byte [esp + 0x7c]
mov dword [esp + 8], edx
call fcn.0041b640
mov eax, dword [esp + 0x54]
jmp 0x42a6ca
lea eax, [esp + 0x70]
mov dword [esp + 0xc], edi
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.0041b7c0
test eax, eax
je 0x42a907
jmp 0x42a90d
cmp dword [esp + 0x2f0], 0
je 0x42acb2
cmp dword [esp + 0x2f4], 0
je 0x42acb2
mov edi, dword [esp + 0x2f0]
or edx, 0xffffffff
xor eax, eax
mov ecx, edx
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x2f4]
not ecx
sub ecx, 1
mov dword [esp + 0x5c], ecx
mov ecx, edx
repne scasb al, byte es:[edi]
mov byte [esp + 0x78], 1
mov edx, ecx
mov ecx, dword [esp + 0x5c]
not edx
lea edi, [edx - 1]
test ecx, ecx
mov byte [esp + 0x79], cl
je 0x42abb7
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x2f0]
lea eax, [esp + 0x7a]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x5c]
test edi, edi
mov ecx, eax
lea edx, [eax + 3]
mov eax, edi
mov byte [esp + ecx + 0x7a], al
je 0x42abef
mov ecx, dword [esp + 0x2f4]
lea eax, [esp + 0x78]
mov dword [esp + 8], edi
mov dword [esp + 0x5c], edx
add eax, edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x5c]
lea eax, [esp + 0x70]
add edi, edx
mov dword [esp + 4], ebp
mov dword [esp + 0xc], edi
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.0041b7c0
test eax, eax
jne 0x42ac1b
cmp edi, dword [esp + 0x70]
je 0x42ac35
mov dword [esp + 4], str.Failed_to_send_SOCKS5_sub_negotiation_request.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
lea eax, [esp + 0x6c]
mov dword [esp + 0xc], 2
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.00429cc0
test eax, eax
jne 0x42ac64
cmp dword [esp + 0x6c], 2
je 0x42ac7e
mov dword [esp + 4], str.Unable_to_receive_SOCKS5_sub_negotiation_response.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
movzx eax, byte [esp + 0x79]
test al, al
je 0x42a886
mov dword [esp + 0xc], eax
movzx eax, byte [esp + 0x78]
mov dword [esp + 4], str.User_was_rejected_by_the_SOCKS5_server___d__d_.
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
mov byte [esp + 0x78], 1
mov byte [esp + 0x79], 0
xor edi, edi
mov byte [esp + 0x7a], 0
mov edx, 3
jmp 0x42abef
mov eax, dword [esp + 0x300]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0042b2e0
test eax, eax
je 0x42a886
mov dword [esp + 4], str.Unable_to_negotiate_SOCKS5_GSS_API_context.
mov dword [esp], esi
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
mov eax, dword [esp + 0x2fc]
lea edi, [esp + 0x74]
mov dword [esp], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2f8]
mov dword [esp + 4], eax
call fcn.00412ca0
cmp eax, 0xffffffff
je 0x42ad90
sub eax, 1
je 0x42ad7b
mov eax, dword [esp + 0x74]
test eax, eax
je 0x42ad56
mov edx, dword [eax]
test edx, edx
je 0x42ad56
cmp dword [edx + 4], 2
je 0x42ae57
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00412e70
mov eax, dword [esp + 0x2f8]
mov dword [esp + 4], str.Failed_to_resolve___s__for_SOCKS5_connect.
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.0041b640
mov eax, 6
jmp 0x42a6ca
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.0040dd90
test eax, eax
je 0x42ad32
jmp 0x42a6ca
mov eax, 6
jmp 0x42a6ca
movzx eax, word [esp + 0x80]
mov dword [esp + 0x1c], edx
mov dword [esp + 4], str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
mov dword [esp], esi
rol ax, 8
movzx eax, ax
mov dword [esp + 0x18], eax
movzx eax, byte [esp + 0x7f]
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x7e]
mov dword [esp + 0x10], eax
movzx eax, byte [esp + 0x7d]
mov dword [esp + 0xc], eax
movzx eax, byte [esp + 0x7c]
mov dword [esp + 8], eax
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
movzx eax, byte [esp + 0x7b]
cmp al, 3
je 0x42af05
cmp al, 4
je 0x42aeb6
mov dword [esp + 4], 1
mov dword [esp], ebp
call fcn.0040da10
xor eax, eax
jmp 0x42a6ca
movzx eax, word [esp + 0x80]
mov dword [esp + 0x10], edx
mov dword [esp + 4], str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
mov dword [esp], esi
rol ax, 8
movzx eax, ax
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2f8]
mov dword [esp + 8], eax
call fcn.0041b640
mov eax, 7
jmp 0x42a6ca
mov byte [esp + 0x7b], 1
mov edi, dword [edx + 0x18]
lea ecx, [esp + 0x7c]
lea eax, [edi + 4]
add edi, 8
movzx edx, byte [eax]
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], ecx
mov byte [ecx], dl
mov dword [esp + 8], edx
mov dword [esp + 4], 0x4f2b39
mov dword [esp], esi
call fcn.0041b5c0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
add eax, 1
add ecx, 1
cmp eax, edi
jne 0x42ae69
mov eax, dword [esp + 0x74]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00412e70
mov eax, 8
jmp 0x42a8cd
cmp dword [ebx + 0x5b8], 0
mov eax, 0x16
jne 0x42ae04
lea edi, [eax - 0xa]
lea eax, [esp + 0x6c]
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x82]
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
call fcn.00429cc0
test eax, eax
jne 0x42a977
cmp edi, dword [esp + 0x6c]
jne 0x42a977
jmp 0x42ae04
movzx eax, byte [esp + 0x7c]
add eax, 7
cmp dword [ebx + 0x5b8], 0
jne 0x42ae04
cmp eax, 0xa
jle 0x42ae04
jmp 0x42aec8