Function at 0x40cb80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c5fb
mov eax, dword fs:[0]
push eax
sub esp, 0x48c
mov eax, dword [0x45f040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x458], esi
mov dword [ebp - 0x448], ecx
xor edi, edi
mov byte [ebp - 0x442], 0
push 0x200
lea eax, [ebp - 0x440]
mov dword [ebp - 0x44c], edi
push edi
push eax
call fcn.00427c40
cmp byte [esi], 0
mov ecx, 0x400
mov eax, 0x200
push edi
cmovne eax, ecx
push eax
push dword [ebp - 0x448]
call fcn.0042b9bb
add esp, 0x18
test eax, eax
jne 0x40d48e
push dword [ebp - 0x448]
push 0x200
push 1
push 0x461cb0
call fcn.0042bbce
add esp, 0x10
cmp eax, 0x200
jne 0x40d48e
mov ecx, 0x461cb0
call fcn.00403ff0
movups xmm0, xmmword [esi]
xor eax, eax
push 0x200
movups xmmword [ebp - 0x474], xmm0
push eax
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x464], xmm0
mov dword [ebp - 0x466], eax
mov word [ebp - 0x462], ax
mov dword [ebp - 0x470], eax
lea eax, [ebp - 0x240]
push eax
mov byte [ebp - 0x473], 0
call fcn.00427c40
movzx eax, word [0x461cb0]
add esp, 0xc
mov dword [ebp - 0x47c], eax
mov ecx, 0x45ff2c
lea eax, [ebp - 0x40]
push eax
call fcn.0040d6b0
push 0x459094
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], edi
call fcn.0040d630
lea eax, [ebp - 0x498]
mov ecx, 0x45ff2c
push eax
call fcn.004098a0
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.0040b4e0
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x484]
cmp ecx, 7
jbe 0x40cd08
mov edx, dword [ebp - 0x498]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40ccfe
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d4bc
push ecx
push edx
call fcn.004265b2
add esp, 8
push 0x45ff2c
lea ecx, [ebp - 0x28]
call fcn.00402450
mov byte [ebp - 4], 3
lea esi, [ebp - 0x28]
cmp dword [ebp - 0x14], 7
mov eax, dword [ebp - 0x18]
cmova esi, dword [ebp - 0x28]
mov ecx, esi
lea edx, [esi + eax*2]
call fcn.0040b7a0
mov ecx, eax
sub ecx, esi
sar ecx, 1
cmp dword [ebp - 0x18], ecx
jb 0x40d4c1
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], ecx
cmova eax, dword [ebp - 0x28]
xor edx, edx
mov byte [ebp - 4], 2
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040ae10
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
push 0x456ef8
cmova eax, dword [ebp - 0x28]
push eax
call fcn.0042b566
mov esi, eax
add esp, 8
mov dword [ebp - 0x450], esi
test esi, esi
jne 0x40ce35
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
push 0x458f1c
call fcn.0040b0e0
mov ecx, dword [ebp - 0x14]
add esp, 8
cmp ecx, 7
jbe 0x40cde0
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40cdd6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d4cb
push ecx
push edx
call fcn.004265b2
add esp, 8
mov ecx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp ecx, 7
jbe 0x40ce2e
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40ce24
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d4cb
push ecx
push edx
call fcn.004265b2
add esp, 8
xor al, al
jmp 0x40d4a1
cmp byte [ebp - 0x474], 0
je 0x40cede
lea ecx, [ebp - 0x498]
call fcn.00403e20
push ecx
push eax
lea edx, [ebp - 0x440]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x474]
call fcn.00404130
mov ecx, dword [ebp - 0x484]
add esp, 8
cmp ecx, 7
jbe 0x40cea7
mov edx, dword [ebp - 0x498]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40ce9d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d4c6
push ecx
push edx
call fcn.004265b2
add esp, 8
push esi
push 0x200
lea eax, [ebp - 0x440]
push 1
push eax
call fcn.0042bfce
add esp, 0x10
cmp eax, 0x200
je 0x40cede
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
push 0x458f58
call fcn.0040b0e0
add esp, 8
movzx eax, word [ebp - 0x468]
lea edx, [ebp - 0x474]
push eax
mov ecx, esi
call fcn.00407630
mov edx, dword [ebp - 0x458]
xor esi, esi
add esp, 4
cmp dword [edx + 4], esi
jle 0x40d3d8
mov eax, dword [ebp - 0x464]
mov dword [ebp - 0x45c], eax
mov eax, dword [ebp - 0x466]
mov dword [ebp - 0x454], eax
movzx eax, word [esi*4 + 0x461cb6]
mov ecx, 0x461cb8
push 0
movzx ecx, word [ecx + esi*4]
shl ecx, 0x10
or ecx, eax
xor eax, eax
cmp byte [edx], al
mov dword [ebp - 0x478], ecx
setne al
add eax, ecx
shl eax, 9
push eax
push dword [ebp - 0x448]
call fcn.0042b9bb
add esp, 0xc
test eax, eax
jne 0x40d1a1
push dword [ebp - 0x448]
lea eax, [ebp - 0x440]
push 0x200
push 1
push eax
call fcn.0042bbce
add esp, 0x10
cmp eax, 0x200
jne 0x40d199
lea ecx, [ebp - 0x440]
call fcn.00403ff0
mov al, byte [ebp - 0x43c]
mov byte [ebp - 0x441], al
movzx eax, word [ebp - 0x43e]
push eax
push dword [ebp - 0x478]
mov dword [ebp - 0x480], eax
movzx eax, byte [ebp - 0x440]
add eax, 0x41
push eax
push esi
push str.part__d::__c:_lba___ld_tlen___d_t
call fcn.0040b0e0
movzx eax, word [ebp - 0x436]
push eax
movzx eax, word [ebp - 0x438]
push eax
movzx eax, word [ebp - 0x43a]
push eax
push str.ldr_06o_bpar_06o_pg_06o__
call fcn.0040b0e0
mov al, byte [ebp - 0x441]
add esp, 0x24
test al, 1
je 0x40d00a
push str.BAD
call fcn.0040b0e0
mov al, byte [ebp - 0x441]
add esp, 4
mov byte [ebp - 0x443], 0
test al, 2
je 0x40d02f
push 0x457550
call fcn.0040b0e0
mov al, byte [ebp - 0x441]
add esp, 4
mov byte [ebp - 0x443], 1
test al, 4
je 0x40d046
push 0x457558
call fcn.0040b0e0
mov al, byte [ebp - 0x441]
add esp, 4
test al, 8
je 0x40d064
push str.FWP
call fcn.0040b0e0
mov al, byte [ebp - 0x441]
add esp, 4
mov byte [ebp - 0x443], 1
test al, 0x10
je 0x40d075
push str.FRP
call fcn.0040b0e0
add esp, 4
push 0x457578
call fcn.0040b0e0
mov ax, word [ebp - 0x466]
mov ecx, 0x800
add esp, 4
cmp ax, cx
jae 0x40d1c7
movzx ecx, word [ebp - 0x46a]
movzx eax, ax
imul ecx, eax
movzx eax, word [ebp - 0x464]
push dword [ebp - 0x480]
add ecx, eax
movzx eax, word [ebp - 0x468]
imul ecx, eax
mov eax, dword [ebp - 0x454]
shl eax, 4
mov dword [ebp - 0x478], ecx
mov ecx, dword [ebp - 0x45c]
and ecx, 0xf
or ecx, eax
cmp byte [ebp - 0x443], 0
mov eax, ecx
not eax
movzx edx, ax
movzx eax, cx
mov ecx, dword [ebp - 0x470]
cmove edx, eax
lea eax, [ecx*4]
lea ecx, [ebp - 0x4a]
sub ecx, eax
lea eax, [ebp - 0x474]
push eax
mov word [ecx], dx
mov edx, dword [ebp - 0x450]
mov ecx, dword [ebp - 0x448]
call fcn.0040d4e0
add esp, 8
test al, al
jne 0x40d134
push esi
push 0x45735c
call fcn.0040b0e0
add esp, 8
inc edi
mov dword [ebp - 0x44c], edi
mov ecx, dword [ebp - 0x450]
lea edx, [ebp - 0x474]
push 0
call fcn.00407630
mov edx, dword [ebp - 0x46a]
add esp, 4
mov ecx, dword [ebp - 0x470]
mov byte [ebp - 0x442], al
mov eax, dword [ebp - 0x466]
imul edx, eax
mov dword [ebp - 0x454], eax
mov eax, dword [ebp - 0x464]
mov dword [ebp - 0x45c], eax
shl ecx, 2
add edx, eax
lea eax, [ebp - 0x4c]
imul edx, dword [ebp - 0x468]
sub eax, ecx
sub edx, dword [ebp - 0x478]
inc dword [ebp - 0x470]
mov word [eax], dx
jmp 0x40d1b6
push esi
push 0x457580
jmp 0x40d1a7
push esi
push 0x4575d8
call fcn.0040b0e0
add esp, 8
inc edi
mov dword [ebp - 0x44c], edi
mov edx, dword [ebp - 0x458]
inc esi
cmp esi, dword [edx + 4]
jge 0x40d1e1
jmp 0x40cf1f
push 0x4578e8
call fcn.0040b0e0
mov edx, dword [ebp - 0x458]
add esp, 4
inc edi
mov dword [ebp - 0x44c], edi
cmp byte [ebp - 0x442], 0
je 0x40d3d8
mov esi, dword [ebp - 0x450]
lea edx, [ebp - 0x474]
mov ecx, esi
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x454], 0
call fcn.00407770
movzx eax, word [ebp - 0x46c]
xor edi, edi
mov ecx, dword [ebp - 0x47c]
mov word [ebp - 0x42], ax
movzx eax, byte [ebp - 0x46a]
mov word [ebp - 0x44], ax
movzx eax, word [ebp - 0x468]
shl ecx, 8
mov word [ebp - 0x46], ax
mov eax, dword [ebp - 0x470]
or ecx, eax
mov word [ebp - 0x48], cx
mov dword [ebp - 0x45c], 0x15c1
lea ecx, [eax*2 + 4]
mov dword [ebp - 0x47c], ecx
cmp ecx, 2
jl 0x40d2ad
mov dx, word [ebp - 0x454]
lea eax, [ebp - 0x44]
mov si, word [ebp - 0x448]
add ecx, 0xfffffffe
shr ecx, 1
inc ecx
lea edi, [ecx + ecx]
add si, word [eax + 2]
lea eax, [eax - 4]
add dx, word [eax + 4]
sub ecx, 1
jne 0x40d283
mov ecx, dword [ebp - 0x47c]
mov word [ebp - 0x448], si
mov esi, dword [ebp - 0x450]
mov word [ebp - 0x454], dx
cmp edi, ecx
jge 0x40d2ca
lea eax, [edi + edi]
lea ecx, [ebp - 0x42]
sub ecx, eax
mov eax, 0x15c1
add ax, word [ecx]
movzx eax, ax
mov dword [ebp - 0x45c], eax
mov eax, dword [ebp - 0x470]
lea ecx, [ebp - 0x4a]
mov edx, dword [ebp - 0x448]
add edx, dword [ebp - 0x454]
add edx, dword [ebp - 0x45c]
shl eax, 2
sub ecx, eax
mov eax, 0xe00
cmp byte [ebp - 0x474], 0
push 0
mov word [ecx], dx
mov ecx, 0x1000
cmovne eax, ecx
push eax
push esi
call fcn.0042b9bb
lea ecx, [ebp - 0x240]
call fcn.00403ff0
push esi
push 0x200
lea eax, [ebp - 0x240]
push 1
push eax
call fcn.0042bfce
add esp, 0x1c
cmp eax, 0x200
je 0x40d353
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
push 0x458fac
call fcn.0040b0e0
add esp, 8
mov byte [ebp - 0x442], 0
xor eax, eax
mov ecx, 0x200
cmp byte [ebp - 0x474], al
push 0
cmovne eax, ecx
push eax
push esi
call fcn.0042b9bb
mov ecx, 0x80
lea edi, [ebp - 0x240]
mov esi, 0x45faf0
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x240]
call fcn.00403ff0
push dword [ebp - 0x450]
lea eax, [ebp - 0x240]
push 0x200
push 1
push eax
call fcn.0042bfce
add esp, 0x1c
cmp eax, 0x200
je 0x40d3cc
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
push 0x458fac
call fcn.0040b0e0
add esp, 8
mov byte [ebp - 0x442], 0
mov edx, dword [ebp - 0x458]
mov edi, dword [ebp - 0x44c]
mov eax, dword [edx + 4]
sub eax, edi
push eax
push 0x458fe0
call fcn.0040b0e0
push dword [ebp - 0x450]
call fcn.0042b6a2
add esp, 0xc
test edi, edi
je 0x40d408
push edi
push 0x457428
call fcn.0040b0e0
add esp, 8
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x40d442
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40d438
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d4cb
push ecx
push edx
call fcn.004265b2
add esp, 8
mov ecx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp ecx, 7
jbe 0x40d49b
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40d482
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d4cb
push ecx
push edx
call fcn.004265b2
add esp, 8
jmp 0x40d49b
push 0x4590a8
call fcn.0040b0e0
add esp, 4
mov al, byte [ebp - 0x442]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004265a4
mov esp, ebp
pop ebp
ret
call fcn.0042b45f
call fcn.00401ab0
call fcn.0042b45f
call fcn.0042b45f
int3