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

Disassembly:
sub esp, 0x68
mov eax, dword [0x53b0f8]
xor eax, esp
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x80]
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push esi
push edi
mov edi, dword [esp + 0x8c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x30], edx
mov ebx, dword [edi + 0xc]
mov esi, dword [edi + 0x90c]
mov dword [esp + 0x14], ebx
mov eax, dword [ebx + eax*4 + 0x150]
mov ecx, dword [ebx + 0x98]
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebx]
mov dword [esp + 0x18], ecx
cmp eax, 1
jl 0x47922d
cmp eax, 0x11
jl 0x47923d
cmp byte [edx], 0
jne 0x47923d
cmp eax, 1
je 0x47923d
mov dword [ebx], 1
mov eax, dword [ebx]
mov edx, 0x51a0e4
dec eax
mov dword [esp + 0x2c], 0x51211d
cmp eax, 0xd
ja case.0x47925d.2
movzx eax, byte [eax + 0x479834]
jmp dword [eax*4 + 0x479818]
cmp byte [ebx + 0x270], 0
mov byte [ebx + 0x100], 1
je 0x479295
push dword [esp + 0x84]
cmp ecx, 6
mov eax, edx
push ebp
cmovne eax, dword [esp + 0x34]
push eax
push str.SOCKS4_s:_connecting_to_HTTP_proxy__s_port__d
push edi
call fcn.00467490
add esp, 0x14
push dword [esp + 0x84]
push ebp
push str.SOCKS4_communication_to__s:_d
push edi
call fcn.00467490
mov ecx, dword [esp + 0x94]
add esp, 0x10
mov eax, ecx
mov word [esi], 0x104
sar eax, 8
cmp dword [esp + 0x18], 6
mov byte [esi + 2], al
mov byte [esi + 3], cl
je 0x47931f
lea eax, [esp + 0x10]
push eax
push 0
push ecx
push ebp
push edi
call fcn.00471df0
add esp, 0x14
cmp eax, 0xffffffff
je 0x4794aa
cmp eax, 1
mov eax, dword [edi + 0xc]
jne 0x479371
cmp dword [eax], 0xa
je 0x4792fb
mov dword [eax], 0xa
push ebp
push str.SOCKS4_non_blocking_resolve_of__s
push edi
call fcn.00467490
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
mov eax, dword [edi + 0xc]
cmp dword [eax], 9
je case.0x47925d.9
mov dword [eax], 9
jmp case.0x47925d.9
push dword [ebx + 0xc4]
push ebp
push edi
call fcn.00471710
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
je 0x47941a
push ebp
push str.Hostname__s_was_found
push edi
mov dword [edi + 0x9d4], eax
mov byte [edi + 0x9e8], 1
call fcn.00467490
mov eax, dword [edi + 0xc]
add esp, 0xc
cmp dword [eax], 0xb
je case.0x47925d.11
mov dword [eax], 0xb
cmp dword [esp + 0x10], 0
je 0x47949b
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
test ebx, ebx
je 0x4793a2
cmp dword [ebx + 4], 2
je 0x47944d
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x479391
push ebp
push str.SOCKS4_connection_to__s_not_supported
push edi
call fcn.004673c0
add esp, 0xc
test ebx, ebx
je 0x4794aa
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
lea ecx, [esi + 8]
mov byte [ecx], 0
test eax, eax
je 0x4794d7
mov edx, eax
lea eax, [edx + 1]
mov dword [esp + 0x14], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x4793d8
mov eax, dword [edi + 0x4e8]
sub edx, dword [esp + 0x14]
sub eax, 8
cmp edx, eax
jb 0x4794c2
push str.Too_long_SOCKS_proxy_user_name__cant_use
push edi
call fcn.004673c0
add esp, 8
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
lea eax, [esp + 0x10]
push eax
push edi
call fcn.00472090
add esp, 8
cmp dword [esp + 0x10], 0
jne 0x479387
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
and eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
push 0x40
lea eax, [esp + 0x38]
push eax
push ebx
call fcn.00471da0
mov ecx, dword [ebx + 0x18]
movzx eax, byte [ecx + 4]
mov byte [esi + 4], al
movzx eax, byte [ecx + 5]
mov byte [esi + 5], al
movzx eax, byte [ecx + 6]
mov byte [esi + 6], al
movzx eax, byte [ecx + 7]
mov byte [esi + 7], al
lea eax, [esp + 0x40]
push eax
push str.SOCKS4_connect_to_IPv4__s__locally_resolved_
push edi
call fcn.00467490
push dword [esp + 0x28]
push edi
call fcn.00472120
add esp, 0x20
jmp 0x4793b1
push ebp
push str.Failed_to_resolve___s__for_SOCKS4_connect.
push edi
call fcn.004673c0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
lea eax, [edx + 1]
push eax
mov eax, dword [esp + 0x20]
push eax
push ecx
call fcn.004a26f0
add esp, 0xc
lea ecx, [esi + 8]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4794e0
sub ecx, edx
cmp dword [esp + 0x18], 6
lea edx, [ecx + 9]
jne 0x479534
mov ecx, ebp
mov dword [esi + 4], 0x1000000
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479503
sub ecx, dword [esp + 0x14]
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
cmp eax, 0xff
ja 0x479590
mov ecx, edx
sub ecx, ebp
add ecx, esi
mov al, byte [ebp]
lea ebp, [ebp + 1]
mov byte [ecx + ebp - 1], al
test al, al
jne 0x479522
add edx, dword [esp + 0x14]
mov dword [ebx + 8], esi
mov dword [ebx + 4], edx
mov eax, dword [edi + 0xc]
cmp dword [eax], 0xe
je case.0x47925d.14
mov dword [eax], 0xe
mov ebp, dword [esp + 0x24]
lea eax, [esp + 0x20]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push ebp
push edi
call fcn.00467850
add esp, 0x14
test eax, eax
je 0x4795b6
cmp eax, 0x51
je 0x4795b6
push str.Failed_to_send_SOCKS4_connect_request.
push edi
call fcn.004673c0
add esp, 8
mov eax, 0x1d
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
push str.SOCKS4:_too_long_host_name
push edi
call fcn.004673c0
add esp, 8
mov eax, 9
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x20]
cmp ecx, eax
je 0x4795e2
pop edi
sub eax, ecx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x1c]
add dword [ebx + 8], eax
xor eax, eax
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
mov dword [ebx + 4], 8
mov dword [ebx + 8], esi
mov eax, dword [edi + 0xc]
cmp dword [eax], 4
je 0x479600
mov dword [eax], 4
jmp 0x479600
mov ebp, dword [esp + 0x24]
lea eax, [esp + 0x28]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push ebp
call fcn.00467590
mov ecx, dword [esp + 0x38]
add esp, 0x10
test eax, eax
je 0x47964e
cmp eax, 0x51
je 0x479678
push eax
call fcn.00451ef0
push eax
push str.SOCKS4:_Failed_receiving_connect_request_ack:__s
push edi
call fcn.004673c0
add esp, 0x10
mov eax, 0xf
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
test ecx, ecx
jne 0x479678
push str.connection_to_proxy_closed
push edi
call fcn.004673c0
add esp, 8
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
mov eax, dword [ebx + 4]
cmp ecx, eax
je 0x4796a0
pop edi
sub eax, ecx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x24]
add dword [ebx + 8], eax
xor eax, eax
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
mov eax, dword [edi + 0xc]
mov edx, 0x51a0e4
cmp dword [eax], 0x11
je case.0x47925d.2
mov dword [eax], 0x11
cmp byte [esi], 0
je 0x4796de
push str.SOCKS4_reply_has_wrong_version__version_should_be_0.
push edi
call fcn.004673c0
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
movzx eax, byte [esi + 1]
lea ecx, [eax - 0x5a]
cmp ecx, 3
ja case.default.0x4796ee
jmp dword [ecx*4 + 0x479844]
cmp dword [esp + 0x18], 6
cmovne edx, dword [esp + 0x2c]
push edx
push str.SOCKS4_s_request_granted.
push edi
call fcn.00467490
mov eax, dword [esp + 0x3c]
add esp, 0xc
pop edi
pop esi
pop ebp
mov byte [eax], 1
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret
movzx ecx, byte [esi + 2]
push eax
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 7]
push ecx
push eax
movzx eax, byte [esi + 6]
push eax
movzx eax, byte [esi + 5]
push eax
movzx eax, byte [esi + 4]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
push edi
call fcn.004673c0
mov eax, 0x1a
jmp 0x4797ff
movzx ecx, byte [esi + 2]
push eax
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 7]
push ecx
push eax
movzx eax, byte [esi + 6]
push eax
movzx eax, byte [esi + 5]
push eax
movzx eax, byte [esi + 4]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client.
push edi
call fcn.004673c0
mov eax, 7
jmp 0x4797ff
movzx ecx, byte [esi + 2]
push eax
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 7]
push ecx
push eax
movzx eax, byte [esi + 6]
push eax
movzx eax, byte [esi + 5]
push eax
movzx eax, byte [esi + 4]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_the_client_program_and_identd_report_different_user_ids.
push edi
call fcn.004673c0
mov eax, 8
jmp 0x4797ff
movzx ecx, byte [esi + 2]
push eax
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 7]
push ecx
push eax
movzx eax, byte [esi + 6]
push eax
movzx eax, byte [esi + 5]
push eax
movzx eax, byte [esi + 4]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
push edi
call fcn.004673c0
mov eax, 0x1f
mov ecx, dword [esp + 0x94]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00434475
add esp, 0x68
ret