Function at 0x509df0
Capabilities:
Access peb ldr_data
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x5ba308
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push esi
mov esi, ecx
push edi
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 8]
mov ecx, esi
push eax
mov dword [esp + 0x34], 0
call fcn.0050a150
test al, al
jne 0x509e51
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor al, al
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x2c
ret
mov edx, dword [esi + 0x3c]
lea ecx, [esp + 0x14]
push 4
mov dword [esp + 0x18], 1
mov eax, dword [edx + 4]
push ecx
push 4
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
mov ecx, dword [esp + 8]
mov edx, dword [esi + 0x28]
push ecx
mov ecx, dword [esi + 0x3c]
push edx
call sub.MFC42.DLL_CAsyncSocket::Bind
test eax, eax
jne 0x509fca
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0xc]
mov edi, eax
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esi + 0x28]
mov ecx, dword [esp + 8]
push edi
push eax
push ecx
lea edx, [esp + 0x18]
push 0x625b38
push edx
mov byte [esp + 0x44], 1
call sub.MFC42.DLL_CString::Format
mov eax, dword [0x63ac20]
add esp, 0x14
test eax, eax
je 0x509f30
mov cl, byte [eax + 0x40]
test cl, cl
je 0x509f30
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
lea ecx, [esp + 0x10]
call fcn.0041a9a0
push eax
mov eax, dword [esi + 0x74]
push 0x60e5d8
push ecx
add eax, 0xac
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x63ac20]
push str.runtime
push str.tdsms
mov edx, dword [ecx + 0x44]
push edx
call fcn.004ec710
mov eax, dword [0x63ac20]
add esp, 0x1c
mov edx, dword [eax + 0x248]
lea ecx, [eax + 0x248]
call dword [edx + 0x1c]
push ecx
lea eax, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x38], 2
mov ecx, esp
mov dword [esp + 0x24], esp
push 0x60e5d8
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x74]
push ecx
add edx, 0xac
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x40], 3
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x40], 4
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x6132bc
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x6357fc]
mov byte [esp + 0x40], 1
call fcn.00458fc0
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor al, al
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x2c
ret
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esi + 0x74]
mov eax, dword [esp + 8]
push eax
lea eax, [esp + 0x14]
mov edx, dword [ecx]
mov byte [esp + 0x34], 5
push edx
push 0x626fb4
push eax
call sub.MFC42.DLL_CString::Format
mov eax, dword [0x63ac20]
add esp, 0x10
test eax, eax
je 0x50a068
mov cl, byte [eax + 0x40]
test cl, cl
je 0x50a068
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
lea ecx, [esp + 0x14]
call fcn.0041a9a0
mov edx, dword [esi + 0x74]
push eax
push 0x60e5d8
push ecx
add edx, 0xac
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x63ac20]
push str.runtime
push str.tdsms
mov ecx, dword [eax + 0x44]
push ecx
call fcn.004ec710
mov edx, dword [0x63ac20]
add esp, 0x1c
mov eax, dword [edx + 0x248]
lea ecx, [edx + 0x248]
call dword [eax + 0x1c]
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x38], 6
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x60e5d8
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esi + 0x74]
push ecx
add eax, 0xac
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
mov byte [esp + 0x40], 7
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x40], 8
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x6132bc
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x6357fc]
mov byte [esp + 0x40], 5
call fcn.00458fc0
mov eax, dword [esi + 0x74]
mov cl, byte [eax + 0x9e]
test cl, cl
je 0x50a0f6
mov ecx, dword [esi + 0x3c]
mov eax, dword [eax + 0xa0]
push 0x162
push eax
mov edx, dword [ecx]
call dword [edx + 0x4c]
push 0
push 5
jmp 0x50a10a
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x3c]
push edx
lea edx, [esi + 8]
mov eax, dword [ecx]
push edx
call dword [eax + 0x4c]
push 0
push 7
mov ecx, esi
call fcn.005087f0
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x28]
pop edi
mov al, 1
mov dword fs:[0], ecx
pop esi
add esp, 0x2c
ret