Function at 0x405340
Capabilities:
Check os version
Initialize winsock library
Read .ini file

Disassembly:
sub esp, 0xb8
push ebx
push esi
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [esp + 0xc8]
push ebp
push str.WS_FTP_LE
mov dword [0x438580], edi
push 0x438030
call ebx
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, 0x80000000
je 0x405388
and al, 0xf
cmp al, 4
jae 0x405388
mov dword [0x42f754], 0
jmp 0x405392
mov dword [0x42f754], 1
push 0x4367f0
mov esi, 1
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ebp, dword [esp + 0xd4]
mov dword [0x43034c], esi
test ebp, ebp
je 0x4053c7
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jle 0x4053c7
mov dword [0x42fac4], esi
jmp 0x4053d1
mov dword [0x42fac4], 0
push 0x438aa0
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x405404
push 0x30
push str.WSAStartup
push 0
push eax
call fcn.0041a600
add esp, 8
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405907
cmp dword [0x42fac4], 0
jne 0x40541b
push edi
call fcn.004051c0
add esp, 4
mov dword [0x42fac8], eax
call fcn.00415a40
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
cmp dword [esp + 0xd0], 0
mov dword [0x437a64], eax
jne 0x405488
call fcn.00408030
cmp eax, 0xffffffff
mov esi, eax
jne 0x405488
cmp dword [0x42fac8], 0
je 0x40545a
mov eax, dword [0x42fac8]
push eax
call fcn.00405320
add esp, 4
lea eax, [esp + 0x48]
push pe_nt_image_headers32
push eax
push 0x37e4
push edi
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x48]
push 0x30
push 0
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, esi
jmp 0x405927
call dword [sym.imp.USER32.dll_GetDialogBaseUnits]
movzx ecx, ax
shr eax, 0x10
mov dword [0x437840], ecx
movzx ecx, ax
mov eax, 0xa
lea edx, [esp + 0x38]
push edx
mov dword [0x437844], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x40]
mov ecx, 6
sub eax, dword [esp + 0x38]
lea eax, [eax + eax*4]
cdq
idiv ecx
mov dword [esp + 0x14], eax
push ebp
cdq
sub eax, edx
push 0x437130
mov dword [esp + 0x18], 0x1b8
sar eax, 1
mov dword [0x4304a8], eax
call ebx
push 0x437130
call fcn.00403780
add esp, 4
mov esi, eax
test esi, esi
jne 0x405510
mov byte [0x437130], 0
jmp 0x405520
cmp esi, 0x437130
je 0x405520
push esi
push 0x437130
call ebx
mov byte [0x438c30], 0
push 0x50
push 0x438c30
push 0x42f0f0
push 0x42fc00
call fcn.00402ec0
add esp, 0x10
cmp byte [0x438c30], 0
je 0x405627
push 0x2c
push 0x438c30
call fcn.00420180
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x405627
mov byte [ebx], 0
inc ebx
push 0x438c30
call fcn.00420160
mov dword [esp + 0x1c], eax
add esp, 4
push 0x2c
push ebx
call fcn.00420180
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x405627
mov byte [ebp], 0
inc ebp
push ebx
call fcn.00420160
mov dword [esp + 0x4c], eax
add esp, 4
push 0x2c
push ebp
call fcn.00420180
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x405627
mov byte [ebx], 0
inc ebx
push ebp
call fcn.00420160
mov dword [esp + 0x18], eax
add esp, 4
push 0x2c
push ebx
call fcn.00420180
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x40561a
mov byte [ebp], 0
inc ebp
push ebx
call fcn.00420160
mov dword [esp + 0x14], eax
add esp, 4
push 0x2c
push ebp
call fcn.00420180
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x405627
mov byte [ebx], 0
push ebp
inc ebx
call fcn.00420160
add esp, 4
mov dword [0x4304a8], eax
push ebx
call fcn.00420160
add esp, 4
mov dword [0x4304ac], eax
jmp 0x405627
push ebx
call fcn.00420160
mov dword [esp + 0x14], eax
add esp, 4
call fcn.004026b0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [0x4304a8]
push edi
mov dword [0x43678c], eax
mov dword [0x436788], ecx
mov eax, dword [0x4304ac]
mov dword [0x4365a8], edx
mov dword [0x4365a4], eax
call fcn.0041db30
mov edx, dword [esp + 0x14]
add esp, 4
mov ecx, dword [0x438580]
push 0
mov eax, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x50]
push 0
push 0
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push 0x2cf0000
push str.WS_FTP_LE
push 0x438030
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x42f7d0], eax
test eax, eax
jne 0x4056ec
cmp dword [0x42fac8], 0
je 0x4056b6
mov eax, dword [0x42fac8]
push eax
call fcn.00405320
add esp, 4
lea eax, [esp + 0x48]
push pe_nt_image_headers32
push eax
push 0x37e5
push edi
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x48]
push 0x30
push 0
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
call sub.WSOCK32.dll_WSACleanup
mov eax, 2
jmp 0x405927
cmp dword [0x431744], 0
mov eax, dword [0x42f7d0]
mov dword [0x437824], eax
jne 0x40571b
test esi, esi
je 0x40570f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jg 0x40571b
mov dword [0x42fac4], 0
jmp 0x405725
mov dword [0x42fac4], 1
cmp dword [0x42fac4], 0
jne 0x405779
cmp dword [esp + 0xd8], 6
je 0x405779
call fcn.0040cf90
push 0x438470
push 0
push str.MAXIMIZE
push 0x42fa20
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, 1
jne 0x405769
push 3
mov eax, dword [0x42f7d0]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x40578c
push 1
mov eax, dword [0x42f7d0]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x40578c
push 6
mov eax, dword [0x42f7d0]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.0040cf90
push 0x96
push 0x437a70
call fcn.00420370
add esp, 8
push 0x42fbec
push edi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
cmp dword [0x42fac4], 0
mov dword [0x437014], eax
je 0x4057c0
push esi
push 0x1de6
jmp 0x4057d0
cmp dword [0x42f848], 0
je 0x4057ea
push 0
push 0x2328
push 0x111
mov eax, dword [0x42f7d0]
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
cmp dword [0x42f848], 0
jne 0x405801
cmp dword [0x42fac8], 0
je 0x405801
mov eax, dword [0x42fac8]
push eax
call fcn.00405320
add esp, 4
cmp dword [0x42fbe0], 0
jne 0x40587d
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
mov ebp, dword [sym.imp.USER32.dll_GetMessageA]
mov esi, dword [sym.imp.USER32.dll_IsDialogMessageA]
xor edi, edi
lea eax, [esp + 0x1c]
push edi
push edi
push edi
push eax
call ebp
test eax, eax
je 0x40587d
cmp dword [0x42f7d4], edi
je 0x405846
lea eax, [esp + 0x1c]
mov ecx, dword [0x42f7d4]
push eax
push ecx
call esi
test eax, eax
jne 0x405875
lea eax, [esp + 0x1c]
mov ecx, dword [0x437014]
push eax
mov edx, dword [0x42f7d0]
push ecx
push edx
call ebx
test eax, eax
jne 0x405875
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [0x42fbe0], edi
je 0x40581e
cmp dword [0x42f868], 0xffffffff
je 0x405899
mov eax, dword [0x42f868]
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f868], eax
cmp dword [0x42f86c], 0xffffffff
je 0x4058b5
mov eax, dword [0x42f86c]
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f86c], eax
cmp dword [0x42f864], 0xffffffff
je 0x4058ee
push str.QUIT
mov eax, dword [0x42f864]
push eax
call fcn.00415e20
add esp, 8
mov eax, dword [0x42f864]
push eax
call fcn.004160f0
add esp, 4
mov dword [0x42f864], eax
mov dword [0x42f7dc], 0
call sub.WSOCK32.dll_WSACleanup
call fcn.00417430
call fcn.0041e770
call fcn.00408120
call fcn.0041fa00
call fcn.0041db90
cmp dword [0x42fac8], 0
je 0x405923
mov eax, dword [0x42fac8]
push eax
call fcn.00405320
add esp, 4
mov eax, dword [esp + 0x24]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xb8
ret 0x10