Function at 0x407c00
Capabilities:
Check if file exists
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534ef6
mov eax, dword fs:[0]
push eax
mov eax, 0x1108
call fcn.004b0a90
mov eax, dword [0x58c758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10f0], ecx
mov eax, 0x202
mov word [ebp - 0x9b4], ax
lea ecx, [ebp - 0x1a4]
push ecx
movzx edx, word [ebp - 0x9b4]
push edx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x9d0], eax
cmp dword [ebp - 0x9d0], 0
je 0x407c6c
xor eax, eax
jmp 0x408280
push 0x540e68
lea eax, [ebp - 0x9c8]
push eax
call fcn.0041acc0
add esp, 8
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x407cca
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov dword [ebp - 0x105c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c8]
call fcn.00401eb0
mov eax, dword [ebp - 0x105c]
jmp 0x408280
call fcn.00401d40
mov dword [ebp - 0x9c0], eax
xor ecx, ecx
mov word [ebp - 0x9ac], cx
push 0x7fe
push 0
lea edx, [ebp - 0x9aa]
push edx
call fcn.004b0ac0
add esp, 0xc
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0
push str.port
push str.migrate
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x9d4], eax
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0x3ff
lea eax, [ebp - 0x9ac]
push eax
push 0x540868
push 0x540e40
push str.migrate
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x540868
lea ecx, [ebp - 0x9bc]
call fcn.00401e30
mov byte [ebp - 4], 1
mov dword [ebp - 0x9b8], 0
cmp dword [ebp - 0x9d4], 0
je 0x407f5e
lea ecx, [ebp - 0x9ac]
push ecx
call fcn.004b0eb7
add esp, 4
test eax, eax
je 0x407f5e
lea edx, [ebp - 0x9ac]
push edx
lea ecx, [ebp - 0x9d8]
call fcn.00401e30
mov byte [ebp - 4], 2
mov dword [ebp - 0x9dc], 0xffffffff
lea ecx, [ebp - 0x9d8]
call fcn.00402010
movzx eax, al
test eax, eax
jne 0x407f4f
push 0
push 0x3b
lea ecx, [ebp - 0x9d8]
call fcn.00408700
mov dword [ebp - 0x9dc], eax
cmp dword [ebp - 0x9dc], 0xffffffff
jne 0x407de0
jmp 0x407f4f
mov ecx, dword [ebp - 0x9dc]
push ecx
lea edx, [ebp - 0x1060]
push edx
lea ecx, [ebp - 0x9d8]
call fcn.00409410
mov dword [ebp - 0x10f4], eax
mov eax, dword [ebp - 0x10f4]
mov dword [ebp - 0x10f8], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10f8]
push ecx
lea ecx, [ebp - 0x9bc]
call fcn.00401970
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1060]
call fcn.00401eb0
mov edx, dword [ebp - 0x9dc]
add edx, 1
push edx
lea eax, [ebp - 0x1064]
push eax
lea ecx, [ebp - 0x9d8]
call fcn.00408770
mov dword [ebp - 0x10fc], eax
mov ecx, dword [ebp - 0x10fc]
mov dword [ebp - 0x1100], ecx
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x1100]
push edx
lea ecx, [ebp - 0x9d8]
call fcn.00401970
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1064]
call fcn.00401eb0
lea ecx, [ebp - 0x9bc]
call fcn.0043e290
mov dword [ebp - 0x9b0], eax
cmp dword [ebp - 0x9b0], 0
jne 0x407ea9
mov dword [ebp - 0x1104], 0
jmp 0x407f1f
mov eax, dword [ebp - 0x9b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x1a8], 0x3fffffff
jle 0x407ed7
mov dword [ebp - 0x1108], 0
jmp 0x407f13
mov eax, dword [ebp - 0x1a8]
shl eax, 1
call fcn.004b1fe0
mov dword [ebp - 0x110c], esp
mov ecx, dword [ebp - 0x9c0]
push ecx
mov edx, dword [ebp - 0x1a8]
shl edx, 1
push edx
mov eax, dword [ebp - 0x9b0]
push eax
mov ecx, dword [ebp - 0x110c]
push ecx
call fcn.00408e90
mov dword [ebp - 0x1108], eax
mov edx, dword [ebp - 0x1108]
mov dword [ebp - 0x1104], edx
push 3
mov eax, dword [ebp - 0x9d4]
push eax
mov ecx, dword [ebp - 0x1104]
push ecx
mov ecx, dword [ebp - 0x10f0]
call fcn.00407460
test eax, eax
je 0x407f4a
mov dword [ebp - 0x9b8], 1
jmp 0x407f4f
jmp 0x407da7
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x9d8]
call fcn.00401eb0
mov dword [ebp - 0x9c4], 0
cmp dword [ebp - 0x9b8], 0
je 0x408120
xor edx, edx
mov word [ebp - 0xb44], dx
push 0xfe
push 0
lea eax, [ebp - 0xb42]
push eax
call fcn.004b0ac0
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0xc44], cx
push 0xfe
push 0
lea edx, [ebp - 0xc42]
push edx
call fcn.004b0ac0
add esp, 0xc
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0x7f
lea eax, [ebp - 0xb44]
push eax
push 0x540868
push 0x540e40
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0x7f
lea ecx, [ebp - 0xc44]
push ecx
push 0x540868
push str.port
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
lea edx, [ebp - 0xb44]
push edx
push 0x540e40
push str.backup
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
lea eax, [ebp - 0xc44]
push eax
push str.port
push str.backup
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
lea ecx, [ebp - 0x9bc]
call fcn.0043e290
push eax
push 0x540e40
push str.proxy
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
xor ecx, ecx
mov word [ebp - 0xa44], cx
push 0x62
push 0
lea edx, [ebp - 0xa42]
push edx
call fcn.004b0ac0
add esp, 0xc
push 0xa
lea eax, [ebp - 0xa44]
push eax
mov ecx, dword [ebp - 0x9d4]
push ecx
call fcn.004b1fa9
add esp, 0xc
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
lea edx, [ebp - 0xa44]
push edx
push str.port
push str.proxy
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0x540868
push str.migrate
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionW]
mov dword [ebp - 0x9c4], 1
cmp dword [0x58fb50], 0
je 0x40811b
mov eax, dword [ebp - 0x9d4]
push eax
mov ecx, dword [ebp - 0x9bc]
push ecx
push str.b0R
push 0x58f750
call fcn.004045b0
add esp, 0x10
jmp 0x408247
push 0x540ed0
push 0x58f750
call fcn.004045b0
add esp, 8
xor edx, edx
mov word [ebp - 0xe4c], dx
push 0x206
push 0
lea eax, [ebp - 0xe4a]
push eax
call fcn.004b0ac0
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x1054], cx
push 0x206
push 0
lea edx, [ebp - 0x1052]
push edx
call fcn.004b0ac0
add esp, 0xc
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0
push str.port
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x1058], eax
lea ecx, [ebp - 0x9c8]
call fcn.0043e290
push eax
push 0x103
lea eax, [ebp - 0x1054]
push eax
push 0x540868
push 0x540e40
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 3
mov ecx, dword [ebp - 0x1058]
push ecx
lea edx, [ebp - 0x1054]
push edx
lea ecx, [ebp - 0x10e8]
call fcn.004087b0
mov dword [ebp - 0x1110], eax
mov eax, dword [ebp - 0x1110]
mov dword [ebp - 0x1114], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x1114]
call fcn.0043e290
push eax
mov ecx, dword [ebp - 0x10f0]
call fcn.00407460
mov dword [ebp - 0x9c4], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10e8]
call fcn.004087e0
cmp dword [ebp - 0x9c4], 0
jne 0x408247
mov ecx, dword [ebp - 0x1058]
push ecx
lea edx, [ebp - 0x1054]
push edx
push 0x540e90
push 0x58f750
call fcn.004045b0
add esp, 0x10
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x9c4]
mov dword [ebp - 0x10ec], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x9bc]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c8]
call fcn.00401eb0
mov eax, dword [ebp - 0x10ec]
lea esp, [ebp - 0x1118]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b0a79
mov esp, ebp
pop ebp
ret