Function at 0x413c40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov eax, dword [0x4af890]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x430]
push edi
push esi
push 1
push 0x28
push eax
mov dword [ebp - 0x444], esi
call fcn.004729cb
add esp, 0x10
cmp eax, 1
jne 0x414113
mov ecx, dword [ebp - 0x430]
cmp ecx, 0x304
ja 0x414113
test cl, 3
jne 0x414113
test ecx, ecx
je 0x414113
mov eax, dword [ebp - 0x42c]
test al, 3
jne 0x414113
mov edi, dword [ebp - 0x428]
cmp eax, edi
jl 0x414113
mov edx, dword [ebp - 0x424]
test edx, edx
je 0x414113
lea eax, [edi + 1]
cmp edx, eax
jg 0x414113
mov eax, dword [ebp - 0x420]
test al, 3
jne 0x414113
test eax, eax
js 0x414113
push esi
push 1
push ecx
lea eax, [ebp - 0x408]
push eax
call fcn.004729cb
add esp, 0x10
cmp eax, 1
jne 0x414113
mov eax, dword [ebp - 0x430]
cmp byte [ebp + eax - 0x409], 0
jne 0x414113
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x454]
push eax
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.0043d6c0
add esp, 0x10
test eax, eax
je 0x4140c3
mov eax, dword [ebp - 0x448]
cmp eax, dword [ebp - 0x40c]
jne 0x4140c3
mov eax, dword [ebp - 0x454]
cmp eax, dword [ebp - 0x414]
jne 0x4140c3
mov eax, dword [ebp - 0x450]
cmp eax, dword [ebp - 0x410]
jne 0x4140c3
mov eax, dword [ebp - 0x45c]
cmp eax, dword [ebp - 0x41c]
jne 0x4140c3
mov eax, dword [ebp - 0x458]
cmp eax, dword [ebp - 0x418]
jne 0x4140c3
lea eax, [ebp - 0x408]
push 0x5c
push eax
call fcn.0046e9f0
add esp, 8
test eax, eax
jne 0x413dbc
lea eax, [ebp - 0x408]
jmp 0x413dbd
inc eax
push 0x100
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004200d0
lea ecx, [ebp - 0x104]
add esp, 0xc
lea edx, [ecx + 1]
jmp 0x413de0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413de0
sub ecx, edx
cmp ecx, 4
jl 0x413e09
lea esi, [ebp + ecx - 0x108]
push str..pk3
push esi
call fcn.0041fe80
add esp, 8
test eax, eax
jne 0x413e09
mov byte [esi], al
lea esi, [ebp - 0x104]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x413e12
mov edx, dword [ebp - 0x428]
sub esi, ecx
add esi, 4
push ebx
and esi, 0xfffffffc
push edx
mov dword [ebp - 0x440], esi
call fcn.00414b20
mov ebx, eax
add edx, 7
push 2
lea ecx, [ebx + edx*4]
add ecx, dword [ebp - 0x424]
lea edi, [esi + ecx*4]
add edi, dword [ebp - 0x42c]
add edi, dword [ebp - 0x430]
push edi
call fcn.0040e720
push edi
mov esi, eax
push 0
push esi
call fcn.0046e6d0
mov eax, dword [ebp - 0x414]
lea ecx, [ebp - 0x408]
mov dword [esi + 0x48], eax
add esp, 0x18
mov eax, dword [ebp - 0x410]
mov dword [esi + 0x4c], eax
mov eax, dword [ebp - 0x41c]
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 0x418]
mov dword [esi + 0x54], eax
mov eax, dword [ebp - 0x40c]
mov dword [esi + 0x44], eax
mov eax, dword [ebp - 0x428]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x424]
mov edi, dword [esi + 0x18]
mov dword [esi + 0x6c], eax
lea eax, [esi + 0x70]
mov dword [esi + 0x28], eax
lea eax, [eax + ebx*4]
mov dword [esi + 0x2c], eax
shl edi, 4
add edi, eax
mov dword [esi + 0x24], ebx
mov edx, dword [ebp - 0x42c]
add edx, edi
mov dword [ebp - 0x44c], edi
mov dword [esi], edx
mov eax, dword [ebp - 0x430]
add eax, edx
mov dword [esi + 4], eax
add eax, dword [ebp - 0x440]
mov dword [esi + 0x68], eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x413ee7
mov edx, dword [esi + 4]
lea ecx, [ebp - 0x104]
mov edi, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x413f00
mov ebx, dword [ebp - 0x444]
push ebx
push 1
push dword [ebp - 0x42c]
push edi
call fcn.004729cb
add esp, 0x10
cmp eax, 1
jne 0x414080
mov eax, dword [ebp - 0x42c]
cmp byte [edi + eax - 1], 0
jne 0x414080
cmp dword [ebp - 0x428], 0
mov edi, dword [esi + 0x2c]
mov dword [ebp - 0x440], 0
jle 0x414007
lea ebx, [ebx]
push ebx
push 1
lea eax, [ebp - 0x43c]
push 0xc
push eax
call fcn.004729cb
add esp, 0x10
cmp eax, 1
jne 0x414080
mov eax, dword [ebp - 0x43c]
cmp eax, dword [ebp - 0x42c]
jae 0x414080
mov ebx, dword [ebp - 0x44c]
add ebx, eax
push ebx
call fcn.00411d70
push ebx
call fcn.004118f0
add esp, 8
test eax, eax
jne 0x413fe5
mov dword [edi], ebx
mov eax, dword [ebp - 0x438]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x434]
mov dword [edi + 4], eax
push dword [esi + 0x24]
push ebx
call fcn.0041f1b0
add esp, 8
lea ecx, [eax*4]
mov eax, dword [esi + 0x28]
mov eax, dword [ecx + eax]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x28]
mov dword [ecx + eax], edi
add edi, 0x10
jmp 0x413fe8
dec dword [esi + 0x18]
mov ebx, dword [ebp - 0x440]
inc ebx
cmp ebx, dword [ebp - 0x428]
mov dword [ebp - 0x440], ebx
mov ebx, dword [ebp - 0x444]
jl 0x413f60
mov eax, dword [esi + 0x6c]
push ebx
push 1
lea eax, [eax*4 - 4]
push eax
mov eax, dword [esi + 0x68]
add eax, 4
push eax
call fcn.004729cb
add esp, 0x10
cmp eax, 1
jne 0x414080
mov eax, dword [esi + 0x68]
mov ecx, dword [0x5cf4b0]
mov dword [esi + 0x64], ecx
mov dword [eax], ecx
mov eax, dword [esi + 0x6c]
lea eax, [eax*4 - 4]
push eax
mov eax, dword [esi + 0x68]
add eax, 4
push eax
call fcn.00418020
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x6c]
shl eax, 2
push eax
push dword [esi + 0x68]
call fcn.00418020
mov dword [esi + 0x14], eax
add esp, 0x10
mov eax, dword [ebp - 0x420]
test eax, eax
jle 0x41409c
push 1
push eax
push ebx
call fcn.00472db6
add esp, 0xc
test eax, eax
je 0x41409e
push esi
call fcn.00412bd0
add esp, 4
xor eax, eax
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046cfaf
mov esp, ebp
pop ebp
ret
js 0x414080
inc dword [0x5d8bd0]
push esi
call fcn.00413520
add esp, 4
mov eax, 1
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046cfaf
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x428]
mov eax, dword [ebp - 0x424]
push 1
lea edx, [eax + ecx*2]
mov eax, dword [ebp - 0x420]
add edx, ecx
lea ecx, [eax + edx*4]
mov eax, dword [ebp - 0x42c]
add eax, 0xfffffffc
add eax, ecx
push eax
push esi
call fcn.00472db6
add esp, 0xc
test eax, eax
jne 0x414113
inc dword [0x5d8bd4]
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046cfaf
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.0046cfaf
mov esp, ebp
pop ebp
ret