Function at 0x408640
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
test dword [ebp + 8], 0x200
push ebx
push esi
push edi
je 0x40865d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x408663
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.MSVCR80.dll_malloc]
push 0x2004
mov dword [esp + 0x18], eax
call esi
mov edi, eax
add esp, 4
test edi, edi
jne 0x408682
jmp fcn.00408a80
push 0x2004
mov dword [edi], 0
lea ebx, [edi + 4]
call esi
add esp, 4
test eax, eax
jne 0x40869e
jmp fcn.00408a80
mov dword [eax], edi
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x18], eax
lea edi, [eax + 4]
lea eax, [ebp + 0x10]
push eax
push ecx
push 0x2000
push ebx
call dword [sym.imp.MSVCR80.dll__vsnprintf]
mov esi, dword [ebp + 8]
add esp, 0x10
test esi, 0x300
mov byte [ebx + 0x1fff], 0
je 0x408704
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408704
push eax
push ecx
push eax
lea eax, [esp + 0x24]
call fcn.00419e60
add esp, 8
push eax
push ebx
push str._s:__s__errno_d_
mov esi, 0x2000
call fcn.00403080
mov esi, dword [ebp + 8]
mov eax, ebx
mov ebx, edi
add esp, 0x10
mov edi, eax
test esi, 0x400
je 0x40876f
mov dword [esp + 0x10], 0
call fcn.0046ab70
test eax, eax
je 0x408753
push 0
push eax
call fcn.0046ab40
push eax
push ebx
push str._s:__s
mov esi, 0x2000
call fcn.00403080
add dword [esp + 0x24], 1
mov eax, ebx
add esp, 0x14
mov ebx, edi
mov edi, eax
call fcn.0046ab70
test eax, eax
jne 0x40871d
cmp dword [esp + 0x10], eax
jne 0x40876c
push ebx
push str._s__OpenSSL_
mov esi, 0x2000
call fcn.00403080
mov eax, ebx
mov ebx, edi
add esp, 8
mov edi, eax
mov esi, dword [ebp + 8]
test esi, 0x8000
je 0x408793
push ebx
push str.Options_error:__s
mov esi, 0x2000
call fcn.00403080
mov esi, dword [ebp + 8]
mov eax, ebx
mov ebx, edi
add esp, 8
mov edi, eax
mov eax, esi
and eax, 0x20000
neg eax
sbb eax, eax
not eax
and eax, dword [0x5426dc]
mov ecx, 0x510330
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jne 0x4087c4
mov eax, 0x5118be
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov ecx, eax
cmp dword [0x53c1f4], 0
jne 0x40880c
mov edx, dword [0x5426cc]
test edx, edx
mov dword [esp + 0x1c], edx
je 0x40880c
push ebx
push ecx
push eax
push str._s_s_s
mov esi, 0x2000
call fcn.00403080
mov eax, dword [esp + 0x2c]
mov edx, dword [ebp + 8]
mov ecx, dword [eax]
push edi
push edx
mov edx, dword [eax + 8]
push ecx
call edx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov esi, dword [ebp + 8]
add esp, 0x1c
test esi, 0x4000
jne 0x4088f1
cmp dword [0x53c1d8], 0
je 0x408837
cmp dword [0x53c1f0], 0
jne 0x408837
cmp dword [0x53c1f4], 0
je 0x4088f1
mov edi, dword [0x53c1e0]
test edi, edi
jne 0x408860
test esi, 0x2010
mov edi, dword [0x53c1e8]
jne 0x408855
mov edi, dword [0x53c1f8]
test edi, edi
jne 0x408860
push 1
call fcn.00408eb0
cmp dword [0x5426d0], 4
sbb edx, edx
add edx, 1
test esi, 0x1000
jne 0x4088bb
cmp dword [0x53c1e4], 0
jne 0x4088bb
test esi, 0x10000
mov esi, 0x5118be
jne 0x40888f
mov esi, 0x51112c
push esi
push ebx
push ecx
push eax
push edx
push 0
push 0
push 0
lea eax, [esp + 0x38]
call fcn.004345a0
add esp, 0x10
push eax
push str._s__s_s_s_s
push edi
call dword [sym.imp.MSVCR80.dll_fprintf]
mov esi, dword [ebp + 8]
add esp, 0x1c
jmp 0x4088e0
test esi, 0x10000
mov edx, 0x5118be
jne 0x4088cd
mov edx, 0x51112c
push edx
push ebx
push ecx
push eax
push str._s_s_s_s
push edi
call dword [sym.imp.MSVCR80.dll_fprintf]
add esp, 0x18
push edi
call dword [sym.imp.MSVCR80.dll_fflush]
add esp, 4
add dword [0x5426e0], 1
mov edi, esi
and edi, 0x10
je 0x40891e
cmp dword [0x5426d0], 1
jb 0x40891e
push 1
call fcn.00408960
add esp, 4
test eax, eax
je 0x40891e
push str.Exiting
push 1
call fcn.00408640
add esp, 8
test edi, edi
je 0x408929
push 1
call fcn.00408eb0
test esi, 0x2000
je 0x408936
jmp 0x42c7f0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x408952
mov edi, dword [sym.imp.MSVCR80.dll_free]
mov esi, dword [eax]
push eax
call edi
add esp, 4
test esi, esi
mov eax, esi
jne 0x408944
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
push 0x1040
call fcn.00408960
add esp, 4
test eax, eax
je 0x42c814
push str.Use___help_for_more_information.
push 0x1040
call fcn.00408640
add esp, 8
push 1
call fcn.00408eb0
int3