Function at 0x507ec7
Capabilities:
Set socket configuration

Disassembly:
mov eax, 0x56f0cf
call fcn.0053c1d0
sub esp, 0x14c
push esi
push edi
mov esi, ecx
push 1
push 2
lea ecx, [ebp - 0x158]
mov dword [ebp - 0x20], esi
call fcn.00404a20
and dword [ebp - 4], 0
cmp dword [esi + 4], 0xffffffff
je 0x507efe
mov ecx, esi
call fcn.00503f97
push dword [ebp + 0xc]
push dword [ebp + 8]
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x508321
push 4
lea ecx, [ebp + 0xc]
push ecx
push 0x1005
mov esi, 0xffff
push esi
mov edi, 0xea60
push eax
mov dword [ebp + 0xc], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x5080fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x158]
push str.setsockopt_SO_SNDTIMEO:
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bbec
mov edi, 0x212
cmp dword [0x5b21c0], edi
jne 0x50830d
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 1
push 2
lea ecx, [ebp - 0xd8]
call fcn.00404a20
mov esi, 0x572a6c
push esi
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x158]
mov byte [ebp - 4], 1
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 2
jb 0x507fb2
mov eax, dword [eax + 4]
jmp 0x507fb5
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x10]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x12]
mov edx, 0x572a38
push eax
push dword [ebp - 0x14]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x16]
push ecx
push dword [ebp - 0x1a]
push ecx
push dword [ebp - 0x1c]
push edx
push 0x5b2
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push 0x57ea88
call fcn.00405500
lea eax, [ebp - 0x3c]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 3
jb 0x508023
mov eax, dword [eax + 4]
jmp 0x508026
add eax, 4
push eax
lea eax, [ebp - 0xd8]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00402c50
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
jmp 0x5082d3
push 4
lea eax, [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x20]
push 0x1006
push esi
push dword [eax + 4]
mov dword [ebp + 0xc], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x50831a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x158]
push str.setsockopt_SO_RCVTIMEO:
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bbec
mov edi, 0x212
cmp dword [0x5b21c0], edi
jne 0x50830d
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 1
push 2
lea ecx, [ebp - 0xd8]
call fcn.00404a20
mov esi, 0x572a6c
push esi
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x158]
mov byte [ebp - 4], 4
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 5
jb 0x508190
mov eax, dword [eax + 4]
jmp 0x508193
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x10]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x12]
mov edx, 0x572a38
push eax
push dword [ebp - 0x14]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x16]
push ecx
push dword [ebp - 0x1a]
push ecx
push dword [ebp - 0x1c]
push edx
push 0x5bf
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push 0x57ea88
call fcn.00405500
lea eax, [ebp - 0x58]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 6
jb 0x508201
mov eax, dword [eax + 4]
jmp 0x508204
add eax, 4
push eax
lea eax, [ebp - 0xd8]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x58]
call fcn.00402c50
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x3c]
push 0
push 1
call fcn.00402c50
lea eax, [ebp - 0xd8]
push eax
call fcn.00407930
pop ecx
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0
call fcn.004028d0
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0x572840
call fcn.0054dfcb
mov ecx, dword [ebp - 0x20]
call fcn.00503f97
jmp 0x508511
xor esi, esi
jmp 0x508514
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x158]
push str.socket:
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bbec
mov edi, 0x212
cmp dword [0x5b21c0], edi
jne 0x508511
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 1
push 2
lea ecx, [ebp - 0xd8]
call fcn.00404a20
mov esi, 0x572a6c
push esi
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x158]
mov byte [ebp - 4], 7
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 8
jb 0x508394
mov eax, dword [eax + 4]
jmp 0x508397
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x10]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x12]
mov edx, 0x572a38
push eax
push dword [ebp - 0x14]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x16]
push ecx
push dword [ebp - 0x1a]
push ecx
push dword [ebp - 0x1c]
push edx
push 0x5c7
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 0xc], esp
push 0x57ea88
call fcn.00405500
lea eax, [ebp - 0x58]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 9
jb 0x508405
mov eax, dword [eax + 4]
jmp 0x508408
add eax, 4
push eax
lea eax, [ebp - 0xd8]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x58]
call fcn.00402c50
push 0
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.00402c50
lea eax, [ebp - 0xd8]
push eax
call fcn.00407930
pop ecx
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0
call fcn.004028d0
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0x572840
call fcn.0054dfcb
or esi, 0xffffffff
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10c]
call fcn.004028d0
lea ecx, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0x572840
call fcn.0054dfcb
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
mov dword fs:[0], ecx
pop esi
leave
ret 8