Function at 0x418284
Capabilities:
Get common file path
Read .ini file
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdc0
push esi
push edi
mov dword [ebp - 0x30], eax
mov eax, 0x53c0e0
call fcn.00503e60
mov esi, 0x536392
lea edi, [ebp - 0x13c]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov esi, 0x536496
lea edi, [ebp - 0x240]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov dword [ebp - 0x34], eax
call fcn.0041f9a0
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x418303
mov word [ebp - 0x1c], 8
mov edx, str.Cant_initialize_windows_socket.
lea eax, [ebp - 4]
call fcn.0050efe0
inc dword [ebp - 0x10]
mov edx, dword [eax]
mov eax, dword [ebp - 0x30]
call fcn.00417710
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0050f140
push 0x539fad
call fcn.0042a82c
pop ecx
mov dl, 1
mov eax, dword [0x4d8104]
call fcn.00401af8
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0x454], eax
mov cl, 1
mov dl, 1
mov eax, dword [0x52624c]
call fcn.00404794
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x458], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x458]
mov byte [ecx + 0xf], 1
mov eax, dword [sym.xscan_gui.exe__MainForm]
mov edx, dword [eax + 0x2f0]
mov ecx, dword [edx + 0x20c]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x458]
mov dword [edx + 0x30], ecx
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x458]
xor edx, edx
mov dword [eax + 0x34], edx
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x458]
mov dword [eax + 0x3c], 3
mov edx, dword [sym.xscan_gui.exe__MainForm]
mov ecx, dword [edx + 0x2f0]
mov eax, dword [ecx + 0x208]
xor edx, edx
call fcn.004b58c4
mov ecx, dword [eax + 0x10]
dec ecx
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x458]
mov dword [edx + 0x38], ecx
mov ecx, dword [sym.xscan_gui.exe__MainForm]
mov eax, dword [ecx + 0x2f0]
mov edx, dword [eax + 0x4c]
add edx, 0xfffffffc
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x458]
mov dword [eax + 0x40], edx
push 0x539fb5
lea edx, [ebp - 0x13c]
push edx
call fcn.00420bd0
add esp, 8
lea ecx, [ebp - 0x13c]
push ecx
push 0x103
lea eax, [ebp - 0x240]
push eax
push 0x539fd0
push str.log_file
push 0x539fc0
call sub.KERNEL32.DLL_GetPrivateProfileStringA
lea edx, [ebp - 0x240]
push edx
mov ecx, dword [ebp - 0x30]
add ecx, 0x664
push ecx
call fcn.00420b88
add esp, 8
lea eax, [ebp - 0x13c]
push eax
push 0x103
lea edx, [ebp - 0x240]
push edx
push 0x539fe4
push str.report_file
push 0x539fd1
call sub.KERNEL32.DLL_GetPrivateProfileStringA
lea ecx, [ebp - 0x240]
push ecx
mov eax, dword [ebp - 0x30]
add eax, 0x768
push eax
call fcn.00420b88
add esp, 8
lea edx, [ebp - 0x13c]
push edx
push 0x103
mov ecx, dword [ebp - 0x30]
add ecx, 0x86c
push ecx
push 0x539ff8
push str.report_type
push 0x539fe5
call sub.KERNEL32.DLL_GetPrivateProfileStringA
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 0x97c], edx
xor edx, edx
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x3ac]
call fcn.0049ad00
xor edx, edx
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x3bc]
call fcn.0049ad00
mov edx, dword [ebp - 0x30]
xor ecx, ecx
mov dword [edx + 0x974], ecx
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 0x418], edx
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ecx + 0x43c], eax
mov edx, dword [ebp - 0x30]
xor ecx, ecx
mov dword [edx + 0x440], ecx
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 0x444], edx
push 0xc
call fcn.00502dd8
pop ecx
mov dword [ebp - 8], eax
test eax, eax
je 0x418510
mov word [ebp - 0x1c], 0x20
mov eax, dword [ebp - 8]
call fcn.0040394c
mov word [ebp - 0x1c], 0x14
mov edx, dword [ebp - 8]
jmp 0x418513
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x30]
mov dword [eax + 0x448], edx
push 0xff
mov ecx, dword [ebp - 0x30]
add ecx, 0x45c
push ecx
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
mov eax, dword [ebp - 0x30]
add eax, 0x45c
push eax
call fcn.00503b91
add esp, 8
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x418556
mov edx, dword [ebp - 0x34]
mov byte [edx], 0
jmp 0x41856a
mov ecx, dword [ebp - 0x30]
add ecx, 0x45c
push ecx
push 0xff
call sub.KERNEL32.DLL_GetCurrentDirectoryA
mov eax, dword [ebp - 0x30]
add eax, 0x45c
push eax
call sub.KERNEL32.DLL_SetCurrentDirectoryA
call fcn.00417f70
push 0x539ff9
mov edx, dword [ebp - 0x30]
add edx, 0x560
push edx
call fcn.00503a5c
add esp, 8
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ecx + 0x970], eax
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
pop edi
pop esi
mov esp, ebp
pop ebp
ret