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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x49e0f3
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x12b4
call fcn.004831d0
mov eax, dword [0x4eed38]
xor eax, esp
mov dword [esp + 0x12b0], eax
push ebx
push esi
push edi
mov eax, dword [0x4eed38]
xor eax, esp
push eax
lea eax, [esp + 0x12c8]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov esi, ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x20], eax
call fcn.0045b40e
mov ecx, dword [eax + 4]
call fcn.00458dad
mov edx, dword [esi + 4]
xor eax, eax
mov dword [esp + 0x12d0], eax
cmp edx, 0xffffffff
je 0x403e9b
cmp ebx, eax
je 0x403e9b
cmp edi, eax
je 0x403e9b
cmp dword [esp + 0x20], eax
je 0x403e9b
mov ecx, 0x213
mov esi, ebx
lea edi, [esp + 0xa6c]
rep movsd dword es:[edi], dword [esi]
jmp 0x403b00
movzx ecx, word [eax + str.BP_R1.0.0]
mov word [esp + eax + 0xa6c], cx
add eax, 2
test cx, cx
jne 0x403b00
mov ecx, dword [ebx + 0x434]
inc ecx
mov dword [esp + 0xea0], ecx
push edx
lea ecx, [esp + 0x40]
mov dword [esp + 0xea8], 0x84c
call fcn.0045c531
push 0x84c
lea edx, [esp + 0xa70]
push edx
lea ecx, [esp + 0x44]
mov byte [esp + 0x12d8], 1
call fcn.0045c248
mov esi, dword [esp + 0xea0]
lea eax, [esp + 0xaa0]
push eax
lea ecx, [esp + 0x30]
call fcn.00402530
mov ebx, esi
imul ebx, ebx, 0xa14
xor eax, eax
dec esi
add ebx, 0x84c
cmp esi, eax
mov byte [esp + 0x12d0], 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x4c], esi
jle 0x403da7
mov edi, dword [esp + 0x20]
add edi, 0x604
mov dword [esp + 0x30], edi
jmp 0x403bb4
mov edi, dword [esp + 0x30]
push 0xa14
lea ecx, [esp + 0x58]
push 0
lea esi, [edi - 0x604]
push ecx
mov dword [esp + 0x28], esi
call fcn.00482280
lea ecx, [edi - 0x400]
mov eax, ecx
lea edx, [eax + 2]
add esp, 0xc
mov dword [esp + 0x54], 0xa14
mov dword [esp + 0x34], edx
lea esp, [esp]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x403bf0
sub eax, dword [esp + 0x34]
sar eax, 1
je 0x403d35
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x403dea
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x1c]
mov dword [edi + 0xc], ebx
mov ecx, 0x285
lea edi, [esp + 0x54]
lea eax, [esp + 0x258]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [esp + 0x1c]
call fcn.00402530
mov ecx, dword [esp + 0x18]
push 0x5c
push ecx
mov byte [esp + 0x12d8], 4
call fcn.00482892
mov edx, dword [esp + 0x20]
add esp, 8
test eax, eax
jne 0x403c84
or ecx, 0xffffffff
jmp 0x403c8a
sub eax, edx
sar eax, 1
mov ecx, eax
mov eax, dword [edx - 0xc]
sub eax, ecx
dec eax
push eax
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x20]
call fcn.004019e0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12d4], 5
call fcn.00401c20
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x12d0], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403cd9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x200
lea ecx, [esp + 0x25c]
push 0
push ecx
call fcn.00482280
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x264]
add esp, 0xc
mov eax, esi
sub edx, esi
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403d00
lea eax, [esi - 0x10]
mov byte [esp + 0x12d0], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403d4d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x403d4d
mov dword [edi], 0
mov dword [edi + 0xc], 0
mov ecx, 0x285
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
push 0xa14
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x44]
call fcn.0045c248
mov eax, dword [esp + 0x28]
push 0xa14
lea edx, [esp + 0x58]
push edx
push eax
call fcn.0040a800
mov edx, dword [esp + 0x28]
add ebx, dword [edx + 0x604]
add dword [esp + 0x3c], 0xa14
movzx ecx, ax
mov eax, dword [esp + 0x20]
inc eax
add esp, 0xc
cmp eax, dword [esp + 0x4c]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], eax
jl 0x403bb0
mov esi, dword [esp + 0x4c]
xor eax, eax
push 0xa14
push eax
lea ecx, [esp + 0x5c]
push ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], eax
call fcn.00482280
add esp, 0xc
mov dword [esp + 0x54], 0xa14
call fcn.00459da6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403ed7
push 0x80004005
call fcn.00401150
lea ecx, [esp + 0x14]
call fcn.00401650
mov eax, dword [esp + 0x1c]
add eax, 0x204
push eax
lea ecx, [esp + 0x18]
push str.Can_not_open_file___s__n
push ecx
mov byte [esp + 0x12dc], 3
call fcn.00401ce0
mov esi, dword [esp + 0x20]
add esp, 0xc
push 1
push 0
push ecx
add esi, 0xfffffff0
mov dword [esp + 0x44], esp
mov edi, esp
push esi
call fcn.004015b0
add eax, 0x10
add esp, 4
mov ecx, 0x4f0110
mov dword [edi], eax
call fcn.0040cea0
mov byte [esp + 0x12d0], 2
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x403e62
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x12d0], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403e8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x12d0], 0
call fcn.0045c6c9
lea ecx, [esp + 0x13]
mov dword [esp + 0x12d0], 0xffffffff
call fcn.00403520
xor eax, eax
mov ecx, dword [esp + 0x12c8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x12b0]
xor ecx, esp
call fcn.004820da
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x1c]
push str._s.xml
push edx
mov byte [esp + 0x12dc], 6
call fcn.00401ce0
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x264]
add esp, 0xc
mov eax, edi
sub edx, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403f15
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x40]
push edx
call fcn.00402d50
test eax, eax
jne 0x403ff9
call fcn.00459da6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403f5e
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x14]
push 0x4a9000
push ecx
mov byte [esp + 0x12d8], 7
call fcn.00401ce0
mov esi, dword [esp + 0x1c]
add esp, 8
push 1
push 0
push ecx
add esi, 0xfffffff0
mov dword [esp + 0x44], esp
mov ebx, esp
push esi
call fcn.004015b0
add eax, 0x10
add esp, 4
mov ecx, 0x4f0110
mov dword [ebx], eax
call fcn.0040cea0
or eax, 0xffffffff
lea edx, [esi + 0xc]
mov byte [esp + 0x12d0], 6
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x403fd3
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x12d0], 2
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403e62
mov ecx, dword [eax]
push eax
jmp 0x403e5b
mov ecx, dword [esp + 0x1c]
push 0xa14
lea edx, [esp + 0x58]
mov dword [esp + 0x65c], ecx
push edx
lea ecx, [esp + 0x44]
mov dword [esp + 0x66c], ebx
mov dword [esp + 0x664], 2
call fcn.0045c248
mov ecx, dword [esp + 0x28]
push 0xa14
lea eax, [esp + 0x58]
push eax
push ecx
call fcn.0040a800
movzx edx, ax
add esp, 0xc
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], 0
test esi, esi
jle 0x404173
mov ebx, dword [esp + 0x20]
add ebx, 0x204
mov dword [esp + 0x24], ebx
mov eax, ebx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404070
sub eax, edx
sar eax, 1
je 0x404158
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
je 0x40429c
push 0xa00000
call fcn.00451e0a
mov ebx, dword [ebx + 0x400]
add esp, 4
mov edi, eax
mov esi, 0xa00000
mov dword [esp + 0x14], 0
test ebx, ebx
jbe 0x404138
push 0xa00000
push 0
push edi
call fcn.00482280
add esp, 0xc
cmp ebx, 0xa00000
jae 0x4040eb
mov esi, ebx
mov ecx, dword [esp + 0x20]
push 0
lea eax, [esp + 0x18]
push eax
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4042ea
cmp dword [esp + 0x14], esi
jne 0x4042ea
push esi
push edi
lea ecx, [esp + 0x44]
sub ebx, esi
call fcn.0045c248
mov edx, dword [esp + 0x28]
push esi
push edi
push edx
call fcn.0040a800
movzx eax, ax
add esp, 0xc
mov dword [esp + 0x28], eax
test ebx, ebx
ja 0x4040d1
push edi
call fcn.00451dff
mov ecx, dword [esp + 0x24]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x30]
inc eax
add ebx, 0xa14
cmp eax, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], ebx
jl 0x404065
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x34]
push ebx
push esi
lea ecx, [esp + 0x44]
call fcn.0045c248
mov ecx, dword [esp + 0x28]
push ebx
push esi
push ecx
call fcn.0040a800
add esp, 0xc
movzx ebx, ax
test esi, esi
je 0x4041a5
push esi
call fcn.00451dff
add esp, 4
lea ecx, [esp + 0x3c]
call fcn.0045c334
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + 0x28]
push 2
push 0
push 0
lea ecx, [esp + 0x48]
call eax
push 0x848
lea ecx, [esp + 0xa70]
push ecx
push 0
mov dword [esp + 0xaa8], eax
call fcn.0040a800
mov edx, dword [esp + 0x48]
add esp, 0xc
push 0
push 0
mov word [esp + 0x12bc], ax
mov eax, dword [edx + 0x28]
push 0
lea ecx, [esp + 0x48]
mov word [esp + 0x12c2], bx
call eax
push 0x84c
lea ecx, [esp + 0xa70]
push ecx
lea ecx, [esp + 0x44]
call fcn.0045c248
lea ecx, [esp + 0x3c]
call fcn.0045c334
lea eax, [edi - 0x10]
mov byte [esp + 0x12d0], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404245
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x12d0], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40426d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x12d0], 0
call fcn.0045c6c9
lea ecx, [esp + 0x13]
mov dword [esp + 0x12d0], 0xffffffff
call fcn.00403520
mov eax, 1
jmp 0x403eb1
call fcn.00459da6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4042b6
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
push ebx
lea ecx, [esp + 0x28]
push str.Can_not_open_file___s__n
push ecx
mov byte [esp + 0x12dc], 8
call fcn.00401ce0
mov esi, dword [esp + 0x30]
add esp, 0xc
jmp 0x403f8c
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00451dff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x12d0], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x403feb