Function at 0x412530
Capabilities:
Read file on windows

Disassembly:
push 0x1ec
mov eax, 0x50dcac
call fcn.00485dd7
mov dword [ebp - 0x130], ecx
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x12c]
mov ebx, dword [ebp + 8]
xor esi, esi
push eax
push edi
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x12c], esi
call fcn.004109d7
pop ecx
pop ecx
push 1
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x118], edx
call fcn.0040516c
push esi
lea eax, [ebp - 0x1f8]
mov dword [ebp - 4], esi
push 3
push eax
call fcn.0048ab5e
push eax
lea eax, [ebp - 0x1d8]
push eax
call fcn.0040d898
mov ecx, eax
add esp, 0x14
mov eax, dword [ecx]
mov eax, dword [eax + 4]
and dword [eax + ecx + 0x14], 0xffffffef
cmp dword [ebp - 0x12c], esi
je 0x4125ff
push 0x51c990
push edi
lea eax, [ebp - 0x1d8]
push str.Could_not_get_size_for_file__
push eax
call fcn.00401bc2
pop ecx
pop ecx
push eax
call fcn.00401b75
pop ecx
pop ecx
push eax
call fcn.00401bc2
lea eax, [ebp - 0x1e8]
push eax
push esi
push dword [ebp - 0x12c]
call fcn.00406bc5
add esp, 0x14
jmp 0x412ac2
cmp dword [ebp - 0x118], esi
ja 0x412a79
cmp dword [ebp - 0x10c], 0xffffffff
ja 0x412a79
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x412622
mov eax, dword [edi]
push str.rt__ccsUTF_8
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.004d2d65
add esp, 0xc
mov dword [ebp - 0x128], eax
test eax, eax
jne 0x412a3f
cmp dword [ebp - 0x114], eax
je 0x412a3f
lea edi, [ebp - 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
push dword [ebp - 0x118]
mov byte [ebp - 4], 1
push dword [ebp - 0x10c]
call fcn.0040e0de
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040bfbe
push 0x10000
lea ecx, [ebp - 0x124]
call fcn.00404f7b
mov byte [ebp - 4], 2
jmp 0x4126d6
mov ecx, dword [ebp - 0x120]
mov edx, dword [ebp - 0x124]
sub ecx, edx
sar ecx, 1
cmp edi, ecx
je 0x4126cc
push dword [ebp - 0x114]
call fcn.004e002d
pop ecx
test eax, eax
jne 0x412873
mov edx, dword [ebp - 0x124]
push edi
push edx
lea ecx, [ebp - 0x2c]
call fcn.00403de9
mov eax, dword [ebp - 0x120]
push dword [ebp - 0x114]
sub eax, dword [ebp - 0x124]
sar eax, 1
push eax
push 2
push dword [ebp - 0x124]
call fcn.004d25a7
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x41269e
push dword [ebp - 0x114]
call fcn.004dffb9
mov edi, dword [ebp - 0x110]
pop ecx
mov ecx, edi
cmp dword [edi + 0x14], 8
jb 0x41271d
mov ecx, dword [edi]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push ecx
cmovae eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x128], eax
lea eax, [ebp - 0x12c]
push eax
call fcn.00408599
mov eax, dword [ebp - 0x130]
mov ecx, eax
add eax, 0xcc
mov byte [ebp - 4], 3
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x74]
push eax
call fcn.0040dc63
lea ecx, [ebp - 0x108]
mov byte [ebp - 4], 4
call fcn.00409938
mov ecx, dword [ebp - 0x130]
lea eax, [ebp - 0x44]
add ecx, 0xd0
mov dword [ebp - 4], 3
push eax
call fcn.00412ce6
cmp dword [ebp - 0x34], 0
mov byte [ebp - 4], 7
je 0x412926
push 0x51be54
lea eax, [ebp - 0x44]
push eax
push 0x51ca90
push edi
lea eax, [ebp - 0x1d8]
push str.Error_int_file__
push eax
call fcn.00401bc2
pop ecx
pop ecx
push eax
call fcn.00401b75
pop ecx
pop ecx
push eax
call fcn.00401bc2
pop ecx
pop ecx
push eax
call fcn.004047a7
pop ecx
pop ecx
push eax
call fcn.00401bc2
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x1d0]
call fcn.00407aba
lea ecx, [ebp - 0x44]
call fcn.00403c1b
lea ecx, [ebp - 0x108]
call fcn.0040e75a
lea ecx, [ebp - 0x124]
call fcn.0040692c
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x412a2a
mov ecx, dword [ebp - 0x2c]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x10c], ecx
cmp eax, 0x1000
jb 0x412865
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.004035bc
mov eax, dword [ebp - 0x110]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x10c]
push eax
push ecx
call fcn.00485961
pop ecx
pop ecx
jmp 0x412a2a
mov edi, dword [ebp - 0x110]
lea eax, [ebp - 0x1d8]
push 0x51c990
push edi
push str.Error_reading_file__
push eax
call fcn.00401bc2
pop ecx
pop ecx
push eax
call fcn.00401b75
pop ecx
pop ecx
push eax
call fcn.00401bc2
lea eax, [ebp - 0x1e8]
push eax
push esi
push esi
call fcn.00406bc5
push dword [ebp - 0x114]
call fcn.004dffb9
add esp, 0x18
lea ecx, [ebp - 0x1d0]
push ebx
call fcn.00407aba
lea ecx, [ebp - 0x124]
call fcn.0040692c
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x412a2a
mov ecx, dword [ebp - 0x2c]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x118], ecx
cmp eax, 0x1000
jb 0x412865
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.004035bc
mov eax, dword [ebp - 0x10c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x118]
jmp 0x412865
mov edi, dword [ebp - 0x130]
cmp dword [edi + 0x174], esi
jbe 0x412965
lea eax, [edi + 0x17c]
push esi
mov ecx, eax
call fcn.004106e3
movzx eax, word [eax]
test dword [edi + 0x1bc], eax
jne 0x41295e
inc esi
lea eax, [edi + 0x17c]
cmp esi, dword [edi + 0x174]
jb 0x41293a
jmp 0x412965
mov byte [edi + 0x1e4], 1
push 0x51acd0
mov ecx, ebx
call fcn.00405101
lea ecx, [ebp - 0x44]
call fcn.00403c1b
lea ecx, [ebp - 0x108]
call fcn.0040e75a
lea ecx, [ebp - 0x124]
call fcn.0040692c
lea ecx, [ebp - 0x2c]
call fcn.00403c1b
jmp 0x412ace
xor eax, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
jmp 0x412ace
push 0x51c990
push edi
lea eax, [ebp - 0x1d8]
push str.Unable_to_open_file__
push eax
call fcn.00401bc2
pop ecx
pop ecx
push eax
call fcn.00401b75
pop ecx
pop ecx
push eax
call fcn.00401bc2
lea eax, [ebp - 0x1e8]
push eax
push esi
push dword [ebp - 0x128]
jmp 0x4125f2
push 0x51c9f4
push edi
lea eax, [ebp - 0x1d8]
push str.Size_of_file__
push eax
call fcn.00401bc2
pop ecx
pop ecx
push eax
call fcn.00401b75
pop ecx
pop ecx
push eax
call fcn.00401bc2
pop ecx
pop ecx
push str.__is_too_large.
push dword [ebp - 0x118]
mov ecx, eax
push dword [ebp - 0x10c]
call fcn.0040e98c
push eax
call fcn.00401bc2
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x1d0]
call fcn.00407aba
lea ecx, [ebp - 0x1e8]
call fcn.00405848
mov eax, ebx
call fcn.00485d29
ret 8