Function at 0x40f844
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov eax, dword [0x4a4100]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x58], edx
push edi
push esi
push 0x8000
push ecx
mov dword [ebp - 0x40], eax
mov ebx, esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x94], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x74], esi
call fcn.0045ff01
mov edi, eax
add esp, 0xc
test edi, edi
js 0x410165
push 2
push esi
push edi
call fcn.00461a91
add esp, 0xc
mov dword [ebp - 0x5c], eax
cmp eax, 0xffffffff
je 0x410165
inc eax
push eax
call fcn.00461b84
mov dword [ebp - 0x48], eax
pop ecx
test eax, eax
je 0x410165
push esi
push esi
push edi
call fcn.00461a91
add esp, 0xc
test eax, eax
jne 0x410165
push dword [ebp - 0x5c]
push dword [ebp - 0x48]
push edi
call fcn.004608ae
add esp, 0xc
cmp eax, dword [ebp - 0x5c]
jne 0x410165
push edi
call fcn.00461141
pop ecx
cmp eax, 0xffffffff
je 0x410165
mov edi, dword [ebp - 0x5c]
lea eax, [edi*4 + 4]
push eax
call fcn.00461b84
mov dword [ebp - 0x78], eax
pop ecx
test eax, eax
je 0x41015d
lea ecx, [edi*4 + 4]
push ecx
call fcn.00461b84
mov dword [ebp - 0x7c], eax
pop ecx
test eax, eax
je 0x41015d
mov ecx, dword [ebp - 0x78]
mov edx, eax
push edi
push dword [ebp - 0x48]
call fcn.0040f442
mov eax, dword [ebp - 0x7c]
push eax
call fcn.0045d3d7
push esi
push 0x8000
push dword [ebp - 0x58]
mov dword [ebp - 0x7c], esi
call fcn.0045ff01
mov edi, eax
add esp, 0x18
test edi, edi
js 0x410165
push 2
push esi
push edi
call fcn.00461a91
add esp, 0xc
mov dword [ebp - 0x6c], eax
cmp eax, 0xffffffff
je 0x410165
inc eax
push eax
mov dword [ebp - 0x30], eax
call fcn.00461b84
mov dword [ebp - 0x3c], eax
pop ecx
test eax, eax
je 0x410165
push esi
push esi
push edi
call fcn.00461a91
add esp, 0xc
test eax, eax
jne 0x410165
push dword [ebp - 0x6c]
push dword [ebp - 0x3c]
push edi
call fcn.004608ae
add esp, 0xc
cmp eax, dword [ebp - 0x6c]
jne 0x410165
push edi
call fcn.00461141
pop ecx
cmp eax, 0xffffffff
je 0x410165
push dword [ebp - 0x30]
or edi, 0xffffffff
mov dword [ebp - 0x44], edi
call fcn.00461b84
mov dword [ebp - 0x64], eax
pop ecx
test eax, eax
je 0x410158
push dword [ebp - 0x30]
call fcn.00461b84
mov dword [ebp - 0x74], eax
pop ecx
test eax, eax
je 0x410158
push 0x48f64c
push dword [ebp - 0x40]
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0xa0], esi
call fcn.0046169c
mov dword [ebp - 0xa4], eax
pop ecx
pop ecx
test eax, eax
jne 0x40fa86
inc esi
mov eax, dword [ebp - 0x64]
push eax
call fcn.0045d3d7
pop ecx
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x40fa3d
push eax
call fcn.0045d3d7
pop ecx
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x40fa4b
push eax
call fcn.0045d3d7
pop ecx
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x40fa59
push eax
call fcn.0045d3d7
pop ecx
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40fa67
push eax
call fcn.0045d3d7
pop ecx
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40fa75
push eax
call fcn.0045d3d7
pop ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045360d
leave
ret
lea edx, [ebp - 0x24]
mov dword [ebp - 0x2c], 0x49445342
xor ecx, ecx
mov dword [ebp - 0x28], 0x30344646
call fcn.0040f724
lea edx, [ebp - 0x1c]
xor ecx, ecx
call fcn.0040f724
mov ecx, dword [ebp - 0x6c]
lea edx, [ebp - 0x14]
call fcn.0040f724
push dword [ebp - 0xa4]
lea eax, [ebp - 0x2c]
push 1
push 0x20
push eax
call fcn.004615ac
add esp, 0x10
cmp eax, 1
jne 0x4100ee
mov edx, dword [ebp - 0xa4]
lea ecx, [ebp - 0x34]
sub esp, 0xc
call fcn.00411be9
mov ebx, eax
mov dword [ebp - 0x88], ebx
test ebx, ebx
je 0x4100ee
mov ecx, dword [ebp - 0x6c]
mov eax, esi
mov dword [ebp - 0x98], eax
mov edi, esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x90], esi
mov dword [ebp - 0x30], esi
test ecx, ecx
jle 0x40ffcd
add edi, eax
mov edx, esi
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x54], edi
cmp edi, ecx
jge 0x40fc35
mov eax, dword [ebp - 0x3c]
sub ecx, edi
mov dword [ebp - 0x50], ecx
lea edx, [edi + eax]
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x30]
sub edx, eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x68], edx
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x94]
push ecx
mov ecx, dword [ebp - 0x50]
push eax
push esi
push ecx
mov ecx, dword [ebp - 0x78]
push edx
mov edx, dword [ebp - 0x48]
push eax
call fcn.0040f673
mov edx, dword [ebp - 0x54]
add esp, 0x18
mov dword [ebp - 0x98], eax
lea ecx, [eax + edi]
cmp edx, ecx
jge 0x40fbc0
mov esi, dword [ebp - 0x3c]
mov eax, ecx
sub esi, dword [ebp - 0x30]
add edx, dword [ebp - 0x30]
sub eax, dword [ebp - 0x54]
mov dword [ebp - 0x58], esi
mov esi, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x58]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x4c]
cmp edx, eax
jge 0x40fba8
mov al, byte [edx + esi]
cmp al, byte [ebx + edx]
mov eax, dword [ebp - 0x5c]
jne 0x40fba8
inc ecx
inc edx
sub dword [ebp - 0x40], 1
jne 0x40fb98
mov ebx, dword [ebp - 0x88]
xor esi, esi
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
cmp eax, edx
jne 0x40fbcb
test eax, eax
jne 0x40fc27
lea eax, [edx + 8]
cmp dword [ebp - 0x98], eax
jg 0x40fc2c
mov edx, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x38]
add edx, ecx
mov eax, dword [ebp - 0x5c]
cmp edx, eax
mov ebx, dword [ebp - 0x88]
mov edx, dword [ebp - 0x4c]
jge 0x40fc0d
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x48]
add edx, ecx
mov edi, dword [ebp - 0x8c]
mov al, byte [edx + eax]
cmp al, byte [ecx]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x5c]
jne 0x40fc0d
dec edx
mov dword [ebp - 0x4c], edx
inc edi
dec dword [ebp - 0x50]
inc ecx
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x6c]
cmp edi, ecx
jge 0x40fc2f
jmp 0x40fb45
mov ecx, dword [ebp - 0x6c]
jmp 0x40fc39
mov ecx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x98]
cmp eax, edx
jne 0x40fc41
cmp edi, ecx
jne 0x40ffc1
mov eax, dword [ebp - 0x60]
mov edx, esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x4c], esi
cmp eax, edi
jge 0x40fcd2
mov esi, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x90]
add ecx, edx
cmp ecx, dword [ebp - 0x5c]
jge 0x40fcc7
mov ecx, dword [ebp - 0x30]
add eax, edx
inc ecx
mov edi, dword [ebp - 0x8c]
mov al, byte [eax + ebx]
mov ebx, dword [ebp - 0x90]
add ebx, edx
cmp byte [ebx + esi], al
mov ebx, dword [ebp - 0x40]
cmovne ecx, dword [ebp - 0x30]
inc edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x50]
lea edx, [ecx + ecx]
sub edx, dword [ebp - 0x38]
lea ecx, [ebx + ebx]
sub ecx, dword [ebp - 0x4c]
cmp edx, ecx
mov edx, dword [ebp - 0x38]
cmovle eax, ebx
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x38]
cmovle eax, dword [ebp - 0x4c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x60]
add eax, edx
cmp eax, edi
mov eax, dword [ebp - 0x60]
jl 0x40fc59
mov ebx, dword [ebp - 0x88]
xor esi, esi
mov ecx, dword [ebp - 0x6c]
mov edx, esi
mov dword [ebp - 0x54], edx
cmp edi, ecx
jge 0x40fd8a
xor ecx, ecx
mov dword [ebp - 0x38], esi
inc ecx
mov dword [ebp - 0x80], esi
inc eax
mov dword [ebp - 0x84], ecx
cmp edi, eax
jl 0x40fd8a
mov eax, dword [ebp - 0x48]
mov ebx, esi
mov edx, dword [ebp - 0x94]
dec eax
add eax, edx
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x3c]
dec eax
add eax, edi
mov dword [ebp - 0x68], eax
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x58], ecx
cmp edx, ecx
jl 0x40fd7c
mov al, byte [eax]
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x30]
inc ecx
cmp byte [edx], al
mov eax, dword [ebp - 0x80]
cmovne ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
add ecx, ecx
lea edx, [eax + eax]
mov eax, dword [ebp - 0x84]
sub ecx, eax
sub edx, ebx
inc eax
dec dword [ebp - 0x68]
dec dword [ebp - 0x50]
cmp ecx, edx
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x84]
cmovle eax, ebx
mov ebx, eax
mov eax, dword [ebp - 0x38]
cmovle eax, dword [ebp - 0x80]
mov dword [ebp - 0x80], eax
lea eax, [ecx + esi]
cmp edi, eax
mov eax, dword [ebp - 0x68]
jge 0x40fd11
mov dword [ebp - 0x54], ebx
xor esi, esi
mov ebx, dword [ebp - 0x88]
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x4c]
mov eax, edi
sub eax, edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x60]
add eax, ecx
cmp eax, dword [ebp - 0x40]
jle 0x40fe80
sub edx, edi
mov dword [ebp - 0x68], esi
add edx, ecx
mov dword [ebp - 0x84], esi
add edx, dword [ebp - 0x60]
mov eax, esi
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x58], esi
test edx, edx
jle 0x40fe70
mov eax, ecx
sub eax, edx
mov edx, dword [ebp - 0x60]
add edx, eax
add edx, dword [ebp - 0x3c]
mov dword [ebp - 0x50], edx
mov edx, dword [ebp - 0x90]
add edx, eax
mov eax, dword [ebp - 0x40]
add edx, dword [ebp - 0x48]
mov dword [ebp - 0x80], edx
mov edx, dword [ebp - 0x94]
sub edx, dword [ebp - 0x54]
add edx, dword [ebp - 0x48]
add eax, dword [ebp - 0x3c]
mov edi, edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x70], edx
mov al, byte [eax]
mov ebx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x68]
mov esi, dword [ebp - 0x40]
inc ecx
mov edx, dword [ebp - 0x84]
cmp byte [ebx], al
mov al, byte [edi]
cmovne ecx, dword [ebp - 0x68]
cmp byte [esi], al
mov eax, edx
lea ebx, [ecx - 1]
cmovne ebx, ecx
mov ecx, dword [ebp - 0x58]
cmp ebx, eax
mov dword [ebp - 0x68], ebx
cmovg eax, ebx
inc ecx
cmp ebx, edx
mov dword [ebp - 0x84], eax
mov eax, ecx
mov dword [ebp - 0x58], ecx
cmovle eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x80]
inc eax
inc dword [ebp - 0x50]
inc dword [ebp - 0x40]
inc edi
mov dword [ebp - 0x80], eax
cmp ecx, dword [ebp - 0x30]
jl 0x40fdff
mov eax, dword [ebp - 0x38]
xor esi, esi
mov edi, dword [ebp - 0x8c]
mov ebx, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
sub eax, edx
mov edx, dword [ebp - 0x54]
add ecx, eax
sub edx, dword [ebp - 0x38]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x70], esi
test ecx, ecx
jle 0x40fec8
mov eax, dword [ebp - 0x48]
mov edx, esi
add eax, dword [ebp - 0x90]
mov ebx, dword [ebp - 0x60]
add ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x64]
add eax, dword [ebp - 0x9c]
mov edi, dword [ebp - 0x58]
mov esi, eax
mov dword [ebp - 0x30], eax
mov al, byte [edx + ebx]
sub al, byte [edx + edi]
mov byte [edx + esi], al
inc edx
cmp edx, ecx
jl 0x40feac
mov edi, dword [ebp - 0x8c]
xor esi, esi
mov ebx, dword [ebp - 0x88]
mov edx, dword [ebp - 0x3c]
mov eax, edi
sub eax, dword [ebp - 0x54]
mov dword [ebp - 0x40], eax
sub eax, ecx
sub eax, dword [ebp - 0x60]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x70], esi
test eax, eax
jle 0x40ff16
mov esi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x74]
add esi, ecx
mov ecx, dword [ebp - 0x30]
add esi, edx
add eax, dword [ebp - 0xa0]
mov edx, dword [ebp - 0x70]
mov edi, eax
mov dword [ebp - 0x58], eax
mov al, byte [esi]
mov byte [edi + edx], al
inc edx
inc esi
cmp edx, ecx
jl 0x40fefd
mov edi, dword [ebp - 0x8c]
xor esi, esi
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x30]
add dword [ebp - 0x9c], ecx
lea edx, [ebp - 0xc]
add dword [ebp - 0xa0], eax
call fcn.0040f724
push 8
lea eax, [ebp - 0xc]
mov edx, ebx
push eax
lea ecx, [ebp - 0x34]
call fcn.00411cbe
cmp dword [ebp - 0x34], 0
jne 0x4100eb
mov ecx, dword [ebp - 0x30]
lea edx, [ebp - 0xc]
call fcn.0040f724
push 8
lea eax, [ebp - 0xc]
mov edx, ebx
push eax
lea ecx, [ebp - 0x34]
call fcn.00411cbe
cmp dword [ebp - 0x34], 0
jne 0x4100eb
mov eax, dword [ebp - 0x94]
lea edx, [ebp - 0xc]
sub eax, dword [ebp - 0x54]
mov ecx, eax
mov dword [ebp - 0x70], eax
sub ecx, dword [ebp - 0x4c]
sub ecx, dword [ebp - 0x90]
call fcn.0040f724
push 8
lea eax, [ebp - 0xc]
mov edx, ebx
push eax
lea ecx, [ebp - 0x34]
call fcn.00411cbe
cmp dword [ebp - 0x34], 0
jne 0x4100eb
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x94]
sub eax, edi
cmp edi, ecx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x98]
jl 0x40fb14
sub esp, 0x14
lea ecx, [ebp - 0x34]
mov edx, ebx
call fcn.00411ddc
cmp dword [ebp - 0x34], 0
jne 0x4100eb
mov edi, dword [ebp - 0xa4]
mov ebx, esi
push edi
call fcn.0045f580
mov dword [ebp - 0x70], eax
pop ecx
cmp eax, 0xffffffff
je 0x4100eb
lea ecx, [eax - 0x20]
lea edx, [ebp - 0x24]
call fcn.0040f724
sub esp, 0xc
lea ecx, [ebp - 0x34]
mov edx, edi
call fcn.00411be9
mov ebx, eax
test ebx, ebx
je 0x4100eb
mov edx, dword [ebp - 0x9c]
lea ecx, [ebp - 0x34]
push edx
push dword [ebp - 0x64]
mov edx, ebx
call fcn.00411cbe
cmp dword [ebp - 0x34], 0
jne 0x4100eb
sub esp, 0x14
lea ecx, [ebp - 0x34]
mov edx, ebx
call fcn.00411ddc
cmp dword [ebp - 0x34], 0
jne 0x4100eb
push edi
mov ebx, esi
call fcn.0045f580
pop ecx
cmp eax, 0xffffffff
je 0x4100eb
sub eax, dword [ebp - 0x70]
lea edx, [ebp - 0x1c]
mov ecx, eax
call fcn.0040f724
sub esp, 0xc
lea ecx, [ebp - 0x34]
mov edx, edi
call fcn.00411be9
mov ebx, eax
test ebx, ebx
je 0x4100eb
mov ecx, dword [ebp - 0xa0]
mov edx, ebx
push ecx
push dword [ebp - 0x74]
lea ecx, [ebp - 0x34]
call fcn.00411cbe
cmp dword [ebp - 0x34], 0
jne 0x4100eb
sub esp, 0x14
lea ecx, [ebp - 0x34]
mov edx, ebx
call fcn.00411ddc
cmp dword [ebp - 0x34], 0
jne 0x4100eb
push esi
push esi
push edi
mov ebx, esi
call fcn.00461076
add esp, 0xc
test eax, eax
jne 0x4100eb
push edi
push 1
lea eax, [ebp - 0x2c]
push 0x20
push eax
call fcn.004615ac
add esp, 0x10
cmp eax, 1
jne 0x4100eb
push edi
call fcn.004603b8
pop ecx
test eax, eax
je 0x40fa25
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x74]
xor esi, esi
push dword [ebp - 0xa4]
mov dword [ebp - 0x74], eax
inc esi
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
call fcn.004603b8
pop ecx
test ebx, ebx
je 0x410168
sub esp, 0x14
lea ecx, [ebp - 0x34]
mov edx, ebx
call fcn.00411ddc
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x74], eax
jmp 0x410168
xor esi, esi
inc esi
jmp 0x410174
xor esi, esi
inc esi
jmp 0x40fa3d
xor esi, esi
inc esi
cmp edi, 0xffffffff
je 0x410174
push edi
call fcn.00461141
pop ecx
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x40fa2f
jmp 0x40fa28