Function at 0x405358
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x4ccbf8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
lea edx, [ebp - 0x138]
push edi
mov dword [ebp - 0x140], esi
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x40537e
push esi
push esi
push 3
push esi
push 3
lea eax, [ebp - 0x138]
push SysReAllocString
push eax
call fcn.0041dce0
mov edi, eax
add esp, 0x1c
cmp edi, 0xffffffff
je 0x4056a5
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
mov ebx, eax
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00486927
pop ecx
push esi
lea ecx, [ebp - 0x13c]
mov dword [ebp - 0x140], eax
push ecx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40569e
cmp ebx, dword [ebp - 0x13c]
jne 0x40569e
push esi
call fcn.0048cba0
mov eax, dword [0x5514ec]
pop ecx
push ebx
push dword [eax + 0x604]
call fcn.00483b6d
pop ecx
pop ecx
mov dword [ebp - 0x144], eax
call fcn.0048cb8d
cmp dword [eax], 0xc
jne 0x405489
call fcn.00435f20
test eax, eax
je 0x40549a
call fcn.00435f20
cmp dword [eax], esi
je 0x40549a
mov eax, dword [0x4edee0]
test eax, eax
je 0x405443
mov eax, dword [eax + 0x190]
jmp 0x405448
mov eax, dword [0x4edee4]
mov dword [ebp - 0x144], eax
call fcn.00435f20
test eax, eax
je 0x405460
call fcn.00435f20
mov eax, dword [eax]
jmp 0x405462
mov eax, esi
mov ecx, str.Error_allocating_memory__
push ecx
push ecx
push dword [0x4edee0]
push dword [ebp - 0x144]
push esi
push 0x240
push str.D:MyProjectsProPilotTestMain.c
push 3
call eax
add esp, 0x20
jmp 0x40549a
mov eax, dword [0x5514ec]
mov ecx, dword [ebp - 0x144]
mov dword [eax + 0x604], ecx
mov eax, dword [0x5514ec]
push ebx
push dword [ebp - 0x140]
push dword [eax + 0x604]
call fcn.00480c20
mov eax, dword [0x5514ec]
add esp, 0xc
push edi
mov dword [eax + 0x608], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x5514ec]
push esi
add eax, 0x5e8
push eax
lea eax, [ebp - 0x140]
push eax
push ebx
push dword [ebp - 0x140]
call fcn.0041e130
mov ebx, eax
add esp, 0x14
mov dword [ebp - 0x144], ebx
test ebx, ebx
je 0x405699
call fcn.00435f20
test eax, eax
je 0x40555c
call fcn.00435f20
cmp dword [eax], esi
je 0x40555c
mov eax, dword [0x4edee0]
test eax, eax
je 0x40551b
mov edi, dword [eax + 0x190]
jmp 0x405521
mov edi, dword [0x4edee4]
call fcn.00435f20
test eax, eax
je 0x405533
call fcn.00435f20
mov eax, dword [eax]
jmp 0x405535
mov eax, esi
mov edx, str.Loading_settings_from__s
lea ecx, [ebp - 0x138]
push edx
push ecx
push edx
push dword [0x4edee0]
push edi
push esi
push 0x247
push str.D:MyProjectsProPilotTestMain.c
push 4
call eax
add esp, 0x24
push 0x614
call fcn.00486927
mov edi, eax
pop ecx
test edi, edi
je 0x40557c
push 0x614
push esi
push edi
call fcn.004811a0
add esp, 0xc
push esi
call fcn.0048cba0
pop ecx
xor ecx, ecx
mov eax, ebx
add eax, 4
setb cl
neg ecx
or ecx, eax
push ecx
push dword [ebp - 0x140]
call fcn.00483b6d
pop ecx
pop ecx
mov ebx, eax
call fcn.0048cb8d
cmp dword [eax], 0xc
jne 0x405610
call fcn.00435f20
test eax, eax
je 0x405608
call fcn.00435f20
cmp dword [eax], esi
je 0x405608
mov eax, dword [0x4edee0]
test eax, eax
je 0x4055ce
mov ebx, dword [eax + 0x190]
jmp 0x4055d4
mov ebx, dword [0x4edee4]
call fcn.00435f20
test eax, eax
je 0x4055e6
call fcn.00435f20
mov eax, dword [eax]
jmp 0x4055e8
mov eax, esi
mov ecx, str.Error_allocating_memory__
push ecx
push ecx
push dword [0x4edee0]
push ebx
push esi
push 0x24b
push str.D:MyProjectsProPilotTestMain.c
push 3
call eax
add esp, 0x20
mov ebx, dword [ebp - 0x140]
jmp 0x405616
mov dword [ebp - 0x140], ebx
push dword [ebp - 0x144]
lea eax, [ebx + 4]
push ebx
push eax
call fcn.00480c20
mov eax, dword [ebp - 0x140]
add esp, 8
mov ecx, dword [ebp - 0x144]
push edi
mov dword [eax], ecx
mov edx, dword [ebp - 0x140]
push str._::RdpHelper::_
push str.MainSettings
call fcn.00404015
add esp, 0x10
test eax, eax
jne 0x405663
mov ecx, edi
call fcn.004049e8
cmp dword [ebp - 0x140], esi
jmp 0x4056ac
mov ecx, dword [edi + 0x5fc]
call fcn.0041058f
mov ecx, dword [0x5514ec]
mov edx, edi
call fcn.00404964
mov ecx, dword [0x551464]
mov edx, edi
call fcn.00404964
mov ecx, edi
mov dword [0x551464], eax
call fcn.004049e8
xor esi, esi
inc esi
jmp 0x4056a5
or esi, 0xffffffff
jmp 0x4056a5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x140], 0
je 0x4056c7
lea eax, [ebp - 0x140]
push eax
call fcn.0041f010
pop ecx
push dword [ebp - 0x140]
call fcn.0048690c
pop ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047f41c
leave
ret