Function at 0x450320
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push 0
lea ecx, [ebp - 0x24]
push ecx
push 1
lea ecx, [ebp - 1]
push ecx
push eax
mov dword [ebp - 0x1c], eax
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45062f
cmp byte [ebp - 1], 0
push edi
je 0x450617
mov eax, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x1fe]
movzx edi, word [eax + 0xc]
add edi, eax
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x10], ecx
test al, 0x10
je 0x45037e
or eax, 0x10000
mov dword [edi + 0x10], eax
test byte [0x4a7b54], 0x10
jne 0x45038e
and dword [edi + 0x10], 0xfbffffff
cmp ecx, 0xffffffff
jne 0x4503a8
xor ecx, ecx
test dword [edi + 0x10], 0x4000
mov dword [ebp - 0x10], ecx
je 0x4503a8
movzx ecx, word [edi + 0xe]
mov dword [ebp - 0x10], ecx
cmp word [edi + 0x1c], 0
push esi
jne 0x4503d7
test dword [edi + 0x10], 0x4000
je 0x4505d1
mov eax, dword [0x4a7b6c]
cmp ecx, dword [eax + 0x74]
jge 0x4505d1
cmp ecx, dword [eax + 0x1f0]
je 0x4505d1
mov eax, dword [edi + 0x10]
mov esi, 0x42000000
mov dword [ebp - 0xc], 4
test al, 0x20
je 0x45043e
xor ecx, ecx
mov esi, 0x82000000
mov dword [ebp - 0xc], ecx
test al, 0x40
je 0x450417
test al, 0x80
mov edx, 0x80
cmovne ecx, edx
mov dword [ebp - 0xc], ecx
mov esi, 0x82c00000
test eax, 0x400
mov ecx, 0x82c80000
cmovne esi, ecx
test eax, 0x100
je 0x450424
or esi, 0x800000
test eax, 0x200
je 0x450431
or esi, 0x40000
test eax, 0x2000
je 0x45043e
or esi, 0x400000
test eax, 0x40000
je 0x45044b
or esi, 0x4000000
call fcn.00402f20
test dword [edi + 0x10], 0x4000
mov dword [ebp - 8], eax
je 0x4504d1
cmp dword [eax + 0x1a8], 0
mov dword [ebp - 0x20], 0
je 0x4504bb
mov edx, dword [eax + 0x84]
test edx, edx
je 0x4504bb
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x18], eax
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x450480
sub ecx, dword [ebp - 0x18]
sar ecx, 1
cmp ecx, 4
jl 0x4504b8
lea eax, [edx - 8]
push 0x4819fc
lea eax, [eax + ecx*2]
push eax
call fcn.0046958d
add esp, 8
test eax, eax
mov eax, dword [ebp - 8]
jne 0x4504bb
mov ecx, dword [eax + 0x84]
jmp 0x4504d4
mov eax, dword [ebp - 8]
cmp dword [0x4a4fe8], 0
jne 0x4504cc
mov ecx, dword [0x4a7cd4]
jmp 0x4504d4
mov ecx, dword [ebp - 0x20]
jmp 0x4504d4
lea ecx, [edi + 0x1c]
push dword [ebp - 0xc]
push esi
push edi
push eax
push dword [ebp - 0x10]
push ecx
call fcn.00403b30
mov esi, eax
add esp, 0x18
test esi, esi
je 0x45057c
mov dword [esi + 0x1ac], ebx
test dword [edi + 0x10], 0x1000
jne 0x450508
mov eax, 0xfff7
and word [esi + 0x14], ax
mov eax, dword [ebp - 0x14]
push 0
mov dword [esi + 0x1b4], 0
test byte [eax + 0x2a], 8
mov eax, dword [esi + 0x1b4]
push 0
push edi
mov ecx, 1
cmovne eax, ecx
push esi
push ebx
mov dword [esi + 0x1b4], eax
call fcn.00450070
push esi
call fcn.00405a50
add esp, 0x18
test eax, eax
jne 0x450551
push esi
call fcn.004027c0
add esp, 4
jmp 0x45056f
push 1
push esi
call fcn.004052e0
add esp, 8
test eax, eax
jne 0x450571
push esi
call fcn.00402ba0
push esi
call fcn.004027c0
add esp, 8
xor esi, esi
push dword [ebp - 8]
call fcn.004056e0
add esp, 4
mov dword [ebx + 0x1f6], esi
test esi, esi
je 0x450592
mov eax, dword [esi + 0x1f0]
mov dword [ebx + 0x1fe], eax
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx + 0x1f6]
test eax, eax
je 0x4505d1
mov eax, dword [eax + 0x1d8]
test eax, eax
je 0x4505d1
cmp dword [eax + 0x78], 1
jne 0x4505d1
mov edx, dword [eax + 0x7c]
test edx, edx
je 0x4505d1
mov eax, dword [ecx + 0x1fe]
mov dword [ecx + 0x1fa], eax
mov eax, dword [edx + 0x18]
mov eax, dword [eax + 0x1f0]
mov dword [ecx + 0x1fe], eax
mov eax, dword [ebx + 0x1f6]
test eax, eax
je 0x450624
push eax
call fcn.004056e0
push 0
push dword [ebx + 0x1f6]
mov esi, eax
call fcn.004052e0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x14], 0
call fcn.00440cc0
push esi
mov edi, eax
call fcn.004056e0
add esp, 0x18
mov eax, edi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 1
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
pop esi
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret