Function at 0x415180
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
push ebx
push ebp
push esi
push edi
call fcn.004472b0
mov ebx, eax
test ebx, ebx
je 0x415488
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0
push ebx
call esi
push 0
push 0
push 0
push ebx
mov edi, eax
call esi
lea ecx, [edi + 1]
push ecx
push 0
push dword [0x49184c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebx
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi], 0x50555245
jne 0x415479
mov eax, dword [esi + 8]
sub eax, 0x494d5031
jne 0x415479
cmp dword [esi + 0xc], 0x50524f43
lea ebx, [esi + 0xc]
mov eax, ebx
jne 0x415479
mov ebp, dword [eax + 4]
add ebx, 8
mov ecx, dword [0x49216c]
add ebp, ebx
mov dword [esp + 0x18], ebp
call fcn.00427230
mov edi, eax
mov ecx, ebx
mov dword [esp + 0x14], edi
call fcn.0042b2a0
mov dword [edi + 8], eax
cmp byte [ebx], 0
je 0x415246
lea ecx, [ecx]
inc ebx
cmp byte [ebx], 0
jne 0x415240
inc ebx
mov byte [edi + 0xc], 0
cmp ebx, ebp
jae 0x415479
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x415258
sub esi, ecx
inc esi
mov ecx, esi
call fcn.0042b200
push esi
mov edi, eax
push ebx
push edi
call fcn.0044a9b0
mov ecx, dword [0x492174]
add esp, 0xc
mov edx, edi
call fcn.00428790
cmp byte [ebx], 0
mov ebp, eax
je 0x415296
lea ebx, [ebx]
inc ebx
cmp byte [ebx], 0
jne 0x415290
push 0x50
lea eax, [ebp + 0x10]
inc ebx
push 0
push eax
call fcn.00449e00
mov esi, ebx
add esp, 0xc
lea ecx, [esi + 1]
lea esp, [esp]
mov al, byte [esi]
inc esi
test al, al
jne 0x4152b0
sub esi, ecx
inc esi
mov ecx, esi
call fcn.0042b200
push esi
mov edi, eax
push ebx
push edi
call fcn.0044a9b0
add esp, 0xc
mov dword [ebp + 0x34], edi
cmp byte [ebx], 0
je 0x4152dc
inc ebx
cmp byte [ebx], 0
jne 0x4152d6
inc ebx
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4152e2
sub esi, ecx
inc esi
mov ecx, esi
call fcn.0042b200
push esi
mov edi, eax
push ebx
push edi
call fcn.0044a9b0
add esp, 0xc
mov dword [ebp + 0x10], edi
cmp byte [ebx], 0
je 0x41530e
inc ebx
cmp byte [ebx], 0
jne 0x415308
mov eax, dword [esp + 0x14]
mov dword [ebp + 0x18], eax
mov eax, dword [ebx + 1]
mov dword [ebp + 0x20], eax
mov eax, dword [ebx + 5]
mov dword [ebp + 0x24], eax
movzx eax, word [ebx + 9]
mov word [ebp + 0x30], ax
movsx eax, word [ebx + 0xb]
mov dword [ebp + 0x38], eax
movzx eax, word [ebx + 0xd]
mov word [ebp + 0x42], ax
movsx ecx, word [ebx + 0xf]
mov dword [ebp + 0x1c], ecx
movzx eax, word [ebx + 0x11]
add ebx, 0x13
mov word [ebp + 0x40], ax
test ecx, ecx
jle 0x4153a0
lea ecx, [ecx + ecx*2]
shl ecx, 2
call fcn.0042b200
xor esi, esi
mov dword [ebp + 0x2c], eax
cmp dword [ebp + 0x1c], esi
jle 0x4153a0
xor edx, edx
mov ecx, dword [ebp + 0x2c]
mov al, byte [ebx]
inc ebx
mov byte [edx + ecx + 0xa], al
mov ecx, dword [ebp + 0x2c]
movsx eax, byte [edx + ecx + 0xa]
add eax, 0xfffffffb
cmp eax, 8
ja case.0x415386.5
movzx eax, byte [eax + 0x41549c]
jmp dword [eax*4 + 0x415490]
mov al, 8
jmp 0x415393
mov al, 4
mov byte [edx + ecx + 0xb], al
inc esi
add edx, 0xc
cmp esi, dword [ebp + 0x1c]
jl 0x415365
movzx eax, word [ebp + 0x40]
test ax, ax
jle 0x41546b
movsx ecx, ax
shl ecx, 3
call fcn.0042b200
mov dword [ebp + 0x3c], eax
xor esi, esi
movzx eax, word [ebp + 0x40]
xor ecx, ecx
mov dword [esp + 0x10], esi
cmp cx, ax
jge 0x41546b
mov ecx, eax
movsx eax, cx
mov ecx, esi
sub ecx, eax
mov eax, dword [ebp + 0x2c]
add ecx, dword [ebp + 0x1c]
lea ecx, [ecx + ecx*2]
movsx eax, byte [eax + ecx*4 + 0xa]
sub eax, 8
je 0x415419
sub eax, 1
je 0x41540c
sub eax, 3
je 0x41540c
mov eax, dword [ebp + 0x3c]
xor ecx, ecx
or ecx, dword [ebx]
mov edx, dword [ebx + 4]
add ebx, 8
mov dword [eax + esi*8], ecx
mov dword [eax + esi*8 + 4], edx
jmp 0x415457
mov eax, dword [ebp + 0x3c]
fld qword [ebx]
add ebx, 8
fstp qword [eax + esi*8]
jmp 0x415457
mov esi, ebx
lea ecx, [esi + 1]
mov edi, edi
mov al, byte [esi]
inc esi
test al, al
jne 0x415420
sub esi, ecx
inc esi
mov ecx, esi
call fcn.0042b200
push esi
mov edi, eax
push ebx
push edi
call fcn.0044a9b0
mov ecx, dword [ebp + 0x3c]
add esp, 0xc
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*8], edi
cmp byte [ebx], 0
je 0x415456
lea ecx, [ecx]
inc ebx
cmp byte [ebx], 0
jne 0x415450
inc ebx
movzx eax, word [ebp + 0x40]
inc esi
mov ecx, eax
mov dword [esp + 0x10], esi
cwde
cmp esi, eax
jl 0x4153d2
cmp ebx, dword [esp + 0x18]
jb 0x415253
mov esi, dword [esp + 0x1c]
push esi
push 0
push dword [0x49184c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret