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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x41b074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
push esi
push str.Loading_from_XML_file:__s
lea edx, [ebp - 0x808]
mov dword [ebp - 0x818], esi
call fcn.00401000
add esp, 8
cmp byte [0x42a3a4], 0
je 0x403abf
lea eax, [ebp - 0x808]
push eax
mov ebx, str.Debug
call fcn.00403450
add esp, 4
xor edi, edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x81c], eax
cmp eax, 0xffffffff
je 0x403cf5
lea ecx, [ebp - 0x810]
push ecx
push eax
mov dword [ebp - 0x810], edi
mov dword [ebp - 0x80c], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x403cbc
mov eax, dword [ebp - 0x810]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x421188], eax
inc eax
push eax
push 8
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov esi, eax
mov dword [ebp - 0x814], esi
test esi, esi
je 0x403cac
mov eax, dword [ebp - 0x810]
mov ecx, dword [ebp - 0x81c]
push 0
lea edx, [ebp - 0x820]
push edx
push eax
push esi
push ecx
mov dword [ebp - 0x820], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403c73
mov eax, dword [ebp - 0x810]
lea edx, [ebp - 0x818]
push edx
push eax
push esi
mov dword [ebp - 0x818], 0xf
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x403bf8
mov ecx, dword [ebp - 0x810]
inc ecx
push ecx
push 8
call edi
push eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x403c49
mov edx, dword [ebp - 0x810]
push edx
push esi
push ebx
call fcn.0040b3f0
add esp, 0xc
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push ebx
push 0
mov dword [0x426188], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b74
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x810]
lea ecx, [eax + eax + 2]
push ecx
push 8
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x403c43
mov edx, dword [ebp - 0x810]
mov eax, dword [ebp - 0x814]
push edx
push esi
push 0xffffffffffffffff
push eax
push 2
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push esi
push 0
mov dword [0x426188], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x814]
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b74
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x818]
push ecx
push str.Unable_to_read__s
lea edx, [ebp - 0x808]
call fcn.00401000
add esp, 8
cmp byte [0x42a3a4], 0
je 0x403c49
lea edx, [ebp - 0x808]
push edx
mov ebx, str.Debug
call fcn.00403450
add esp, 4
jmp 0x403c49
cmp byte [0x42a3a4], 0
je 0x403cd7
push str.Unable_to_allocate_file_buffer
jmp 0x403cca
cmp byte [0x42a3a4], 0
je 0x403cd7
push str.GetFileSizeEx_failed
mov ebx, str.Debug
call fcn.00403450
add esp, 4
mov eax, dword [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b74
mov esp, ebp
pop ebp
ret
cmp byte [0x42a3a4], 0
je 0x403d10
push str.CreateFile_failed
mov ebx, str.Debug
call fcn.00403450
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404b74
mov esp, ebp
pop ebp
ret