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

Disassembly:
sub esp, 0x7c
mov eax, dword [0x5df040]
xor eax, esp
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x90]
push ebx
mov ebx, dword [esp + 0x90]
push ebp
mov ebp, dword [esp + 0x8c]
push esi
mov esi, dword [esp + 0x8c]
push edi
mov edi, dword [esp + 0x98]
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], 0
call fcn.0050d730
add esp, 4
test eax, eax
je 0x510a36
lea eax, [esp + 0x54]
push eax
mov eax, dword [0x5e1c6c]
push 0
push dword [ebx + 4]
mov eax, dword [eax + 0x2c]
call eax
cmp eax, 0x80090300
je 0x510806
test eax, eax
jne 0x510a1e
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
push edi
mov dword [esp + 0x44], 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], 0xa
call fcn.004bc8b0
push edi
mov dword [esp + 0x34], eax
call fcn.0050d730
push eax
call fcn.004bcab0
add esp, 0xc
mov dword [esp + 0x24], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], 0
push eax
push 0
lea eax, [esp + 0x44]
push eax
mov eax, dword [0x5e1c6c]
push dword [ebx + 4]
mov eax, dword [eax + 0x68]
call eax
test eax, eax
jne 0x510a36
cmp dword [esp + 0x30], 4
je 0x510770
push str.GSSAPI_handshake_failure__invalid_security_data_
jmp 0x510a3b
mov ecx, dword [esp + 0x38]
push ecx
movzx edi, byte [ecx + 1]
movzx eax, byte [ecx + 2]
movzx ebx, byte [ecx]
shl edi, 8
or edi, eax
movzx eax, byte [ecx + 3]
shl edi, 8
or edi, eax
mov eax, dword [0x5e1c6c]
mov eax, dword [eax + 0x40]
call eax
and ebx, reloc.WS2_32.dll_accept
mov dword [esp + 0x10], ebx
jne 0x5107ae
push str.GSSAPI_handshake_failure__invalid_security_layer_
jmp 0x510a3b
push dword [esp + 0x60]
xor eax, eax
test edi, edi
cmove eax, edi
mov dword [esp + 0x20], eax
call dword [0x5df1ac]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x510806
mov esi, 4
test ebp, ebp
je 0x5107ec
mov ecx, ebp
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5107e0
sub ecx, edx
lea esi, [ecx + 4]
push esi
call dword [0x5df1ac]
mov edi, eax
add esp, 4
test edi, edi
jne 0x51081e
push ebx
call dword [0x5df1b0]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00423495
add esp, 0x7c
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov byte [edi], al
mov eax, ecx
shr eax, 0x10
mov byte [edi + 1], al
mov eax, ecx
shr eax, 8
mov byte [edi + 2], al
mov byte [edi + 3], cl
test ebp, ebp
je 0x510856
cmp byte [ebp], 0
je 0x510856
lea eax, [esi - 4]
push eax
lea eax, [edi + 4]
push ebp
push eax
call fcn.00548d90
add esp, 0xc
push dword [esp + 0x5c]
call dword [0x5df1ac]
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x51087f
push edi
call dword [0x5df1b0]
push ebx
call dword [0x5df1b0]
lea eax, [ebp + 0x1b]
jmp 0x510a46
lea eax, [esp + 0x64]
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x60]
push esi
mov dword [esp + 0x50], 3
mov dword [esp + 0x6c], 2
mov dword [esp + 0x70], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x78], 1
mov dword [esp + 0x7c], edi
call fcn.004bcab0
add esp, 4
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x80], 9
push 0
push eax
mov eax, dword [esp + 0x1c]
push reloc.WS2_32.dll_accept
mov dword [esp + 0x90], ebp
push dword [eax + 4]
mov eax, dword [0x5e1c6c]
mov eax, dword [eax + 0x64]
call eax
mov esi, eax
test esi, esi
je 0x51093f
push ebp
call dword [0x5df1b0]
push edi
call dword [0x5df1b0]
push ebx
call dword [0x5df1b0]
add esp, 0xc
mov eax, 0x5e
cmp esi, 0x80090300
mov ecx, 0x1b
cmove eax, ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00423495
add esp, 0x7c
ret
mov eax, dword [esp + 0x7c]
add eax, dword [esp + 0x70]
add eax, dword [esp + 0x64]
push eax
mov dword [esp + 0x18], eax
call dword [0x5df1ac]
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x510991
push ebp
call dword [0x5df1b0]
push edi
call dword [0x5df1b0]
push ebx
call dword [0x5df1b0]
add esp, 0xc
mov eax, 0x1b
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00423495
add esp, 0x7c
ret
push dword [esp + 0x64]
push dword [esp + 0x70]
push eax
call fcn.00548d90
push dword [esp + 0x7c]
mov esi, dword [esp + 0x74]
push dword [esp + 0x88]
mov eax, dword [esp + 0x24]
add eax, esi
push eax
call fcn.00548d90
push dword [esp + 0x94]
mov eax, dword [esp + 0x8c]
add eax, dword [esp + 0x2c]
push dword [esp + 0xa0]
add eax, esi
push eax
call fcn.00548d90
push ebp
call dword [0x5df1b0]
push edi
call dword [0x5df1b0]
push ebx
call dword [0x5df1b0]
push 0x4b8020
push dword [esp + 0x48]
push dword [esp + 0x48]
push dword [esp + 0x5c]
call fcn.0050d790
add esp, 0x40
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00423495
add esp, 0x7c
ret
pop edi
pop esi
pop ebp
mov eax, 0x5e
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00423495
add esp, 0x7c
ret
push str.GSSAPI_handshake_failure__empty_security_message_
push esi
call fcn.004cf0b0
mov eax, 0x3d
mov ecx, dword [esp + 0x90]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00423495
add esp, 0x7c
ret