Function at 0x407ce8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x407cf0
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040357c
mov edi, 0x41acc0
xor eax, eax
push ebp
push 0x4089d5
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.004076b8
mov eax, dword [ebp - 8]
call fcn.00403208
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.0040338c
cmp eax, 0x7f
jge 0x407d61
push 0
push 0x41ac34
mov eax, dword [ebp - 4]
call fcn.0040358c
push eax
call sub.kernel32.dll_OpenFile
mov dword [0x41abe0], eax
cmp dword [0x41abe0], 0xffffffff
jne 0x407d94
mov ebx, 1
jmp 0x407d94
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.0040358c
push eax
call sub.kernel32.dll_CreateFileA
mov dword [0x41abe0], eax
cmp dword [0x41abe0], 0xffffffff
jne 0x407d94
mov ebx, 2
test ebx, ebx
jbe 0x407df8
call sub.kernel32.dll_GetLastError
mov ebx, eax
mov eax, ebx
cmp eax, 0xcf
ja 0x407daf
bt dword [0x4089e4], eax
jb 0x407de8
cmp ebx, 0x4cf
je 0x407de8
push 0x408a08
push dword [ebp - 4]
push 0x408a18
lea edx, [ebp - 0x10]
mov eax, ebx
call fcn.004057d8
push dword [ebp - 0x10]
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.0040344c
mov eax, dword [ebp - 0xc]
call fcn.0040fd78
mov eax, dword [0x41abe0]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x4089b2
mov eax, 0x41ac10
call fcn.00403208
mov eax, 0x41ac14
call fcn.00403208
mov eax, 0x41ac18
call fcn.00403208
xor eax, eax
mov dword [0x41ac04], eax
xor eax, eax
mov dword [0x41ac08], eax
mov eax, 0x41ab68
mov edx, 0x408a24
call fcn.0040325c
xor eax, eax
mov dword [0x41ac0c], eax
xor eax, eax
mov dword [0x41ac00], eax
mov eax, 0x41ac1c
mov edx, 0x12
call fcn.0040366c
mov eax, 0x41ac20
mov edx, 0x20
call fcn.0040366c
mov eax, 0x41ac24
mov edx, 0x1a
call fcn.0040366c
mov eax, 0x41ac28
mov edx, 0x2f
call fcn.0040366c
mov eax, 0x41ac2c
mov edx, 0x12
call fcn.0040366c
mov eax, 0x41ac30
mov edx, 0x20
call fcn.0040366c
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x4088e3
cmp dword [0x41abe4], 0x32
jb 0x40890f
cmp dword [0x41abe4], 0x100000
jae 0x407ecb
mov eax, dword [edi]
mov edx, dword [0x41abe4]
mov byte [eax + edx + 1], 0
mov byte [0x41acbc], 0
mov byte [0x41acbd], 0
mov byte [0x41acbe], 0
mov esi, dword [0x41abe4]
test esi, esi
jbe 0x4088d8
mov ebx, 1
cmp byte [0x41acbe], 0
jne 0x407f13
mov eax, dword [edi]
cmp byte [eax + ebx], 8
jne 0x4080ca
inc byte [0x41acbe]
jmp 0x4080ca
cmp byte [0x41acbe], 1
jne 0x407f5a
mov eax, dword [edi]
mov al, byte [eax + ebx]
mov edx, eax
and dl, 0xf
cmp dl, 9
jne 0x407f4e
and eax, 0xff
shr eax, 4
cmp eax, 0xff
ja 0x407f41
bt dword [0x419158], eax
jae 0x407f4e
inc byte [0x41acbe]
jmp 0x4080ca
mov byte [0x41acbe], 0
jmp 0x4080ca
cmp byte [0x41acbe], 1
jbe 0x407f9a
cmp byte [0x41acbe], 9
jae 0x407f9a
mov eax, dword [edi]
mov al, byte [eax + ebx]
xor edx, edx
mov dl, al
shr edx, 4
cmp edx, 0xa
jae 0x407f8e
and al, 0xf
cmp al, 0xa
jae 0x407f8e
inc byte [0x41acbe]
jmp 0x4080ca
mov byte [0x41acbe], 0
jmp 0x4080ca
mov al, byte [0x41acbe]
add al, 0xf7
sub al, 7
jae 0x407fc4
mov eax, dword [edi]
cmp byte [eax + ebx], 0
jne 0x407fb8
inc byte [0x41acbe]
jmp 0x4080ca
mov byte [0x41acbe], 0
jmp 0x4080ca
cmp byte [0x41acbe], 0x10
jne 0x4080ca
mov eax, dword [0x41ac2c]
call fcn.0040358c
mov edx, eax
xor eax, eax
mov al, byte [0x41acbe]
mov ecx, ebx
sub ecx, eax
mov eax, dword [edi]
add eax, ecx
mov ecx, 9
call fcn.00405a68
mov eax, dword [0x41ac2c]
call fcn.00405a04
test al, al
je 0x4080c3
mov eax, dword [0x41ac30]
call fcn.0040358c
mov edx, eax
mov eax, dword [edi]
add eax, ebx
mov ecx, 0x10
call fcn.00405a68
mov eax, dword [0x41ac30]
call fcn.00405a04
test al, al
je 0x4080c3
mov edx, dword [0x41ac18]
mov eax, dword [0x41ac30]
call fcn.00403624
test eax, eax
jne 0x4080c3
push dword [0x41ac18]
push 0x408a18
push 0x408ac0
mov eax, dword [0x41ac00]
add eax, ebx
xor edx, edx
mov dl, byte [0x41acbe]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x14]
call fcn.00404900
push dword [ebp - 0x14]
push 0x408ad0
push dword [0x41ac2c]
push 0x408adc
push 0x408ae8
mov eax, dword [0x41ac00]
add eax, ebx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18]
call fcn.00404900
push dword [ebp - 0x18]
push 0x408ad0
push dword [0x41ac30]
mov eax, 0x41ac18
mov edx, 0xb
call fcn.0040344c
inc dword [0x41ac0c]
mov byte [0x41acbe], 0
cmp byte [0x41acbc], 0
jne 0x4080ea
mov eax, dword [edi]
cmp byte [eax + ebx], 0x30
jne 0x408471
inc byte [0x41acbc]
jmp 0x408471
cmp byte [0x41acbc], 1
jne 0x408120
mov eax, dword [edi]
cmp byte [eax + ebx], 0x38
jne 0x40810d
inc byte [0x41acbc]
mov byte [0x41acbd], 2
jmp 0x4088d0
mov byte [0x41acbc], 0
mov byte [0x41acbd], 0
jmp 0x408471
cmp byte [0x41acbc], 2
jne 0x408167
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419138], eax
jae 0x40815b
mov eax, dword [edi]
mov al, byte [eax + ebx - 3]
and eax, 0xff
bt dword [0x419118], eax
jae 0x40815b
inc byte [0x41acbc]
jmp 0x408471
mov byte [0x41acbc], 0
jmp 0x408471
cmp byte [0x41acbc], 3
jne 0x40818f
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x408183
inc byte [0x41acbc]
jmp 0x408471
mov byte [0x41acbc], 0
jmp 0x408471
cmp byte [0x41acbc], 3
jbe 0x4081cb
cmp byte [0x41acbc], 0x11
jae 0x4081cb
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x4190d8], eax
jae 0x4081bf
inc byte [0x41acbc]
jmp 0x408471
mov byte [0x41acbc], 0
jmp 0x408471
cmp byte [0x41acbc], 0x11
jne 0x408471
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x4190d8], eax
jae 0x408471
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x419118], eax
jae 0x408471
xor eax, eax
mov al, byte [0x41acbc]
mov edx, ebx
sub edx, eax
mov dword [0x41abe8], edx
mov byte [0x41acbc], 0
mov eax, 0x41ac1c
call fcn.004035dc
mov edx, dword [edi]
mov ecx, dword [0x41abe8]
add edx, ecx
mov ecx, 0x12
call fcn.004043ec
mov eax, dword [0x41ac1c]
call fcn.00405a04
test al, al
je 0x408471
push dword [0x41ac10]
push 0x408a18
push 0x408af8
mov eax, dword [0x41ac00]
add eax, dword [0x41abe8]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1c]
call fcn.00404900
push dword [ebp - 0x1c]
push 0x408ad0
push dword [0x41ac1c]
mov eax, 0x41ac10
mov edx, 6
call fcn.0040344c
cmp dword [0x41abe8], 0xc8
jbe 0x4082b0
mov eax, dword [0x41abe8]
sub eax, 0xc8
mov dword [0x41abf0], eax
jmp 0x4082ba
mov dword [0x41abf0], 1
mov eax, dword [0x41abe8]
add eax, 0xc8
mov dword [0x41abf8], eax
mov eax, dword [0x41abf8]
add eax, 0x20
cmp eax, dword [0x41abe4]
jbe 0x4082e3
mov eax, dword [0x41abe4]
mov dword [0x41abf8], eax
mov eax, dword [0x41abf0]
cmp eax, dword [0x41abf8]
ja 0x40846a
mov eax, dword [0x41abf0]
cmp eax, dword [0x41abe8]
jbe 0x40830f
cmp ebx, dword [0x41abf0]
jbe 0x40830f
mov dword [0x41abf0], ebx
cmp byte [0x41acbc], 0x1f
jae 0x408348
mov eax, dword [edi]
mov edx, dword [0x41abf0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x4190f8], eax
jae 0x40833c
inc byte [0x41acbc]
jmp 0x408453
mov byte [0x41acbc], 0
jmp 0x408453
cmp byte [0x41acbc], 0x1f
jne 0x408453
mov eax, dword [edi]
mov edx, dword [0x41abf0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x4190f8], eax
jae 0x40844c
mov eax, dword [edi]
mov edx, dword [0x41abf0]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x419118], eax
jae 0x40844c
mov eax, dword [edi]
mov edx, dword [0x41abf0]
mov al, byte [eax + edx - 0x20]
and eax, 0xff
bt dword [0x419118], eax
jae 0x40844c
mov eax, 0x41ac20
call fcn.004035dc
xor edx, edx
mov dl, byte [0x41acbc]
mov ecx, dword [0x41abf0]
sub ecx, edx
mov edx, dword [edi]
add edx, ecx
mov ecx, 0x20
call fcn.004043ec
mov eax, dword [0x41ac20]
call fcn.00405a04
test al, al
je 0x40844c
mov edx, dword [0x41ac10]
mov eax, dword [0x41ac20]
call fcn.00403624
test eax, eax
jne 0x40844c
push dword [0x41ac10]
push 0x408adc
push 0x408b08
mov eax, dword [0x41ac00]
add eax, dword [0x41abf0]
xor edx, edx
mov dl, byte [0x41acbc]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x20]
call fcn.00404900
push dword [ebp - 0x20]
push 0x408ad0
push dword [0x41ac20]
mov eax, 0x41ac10
mov edx, 6
call fcn.0040344c
inc dword [0x41ac04]
mov byte [0x41acbc], 0
inc dword [0x41abf0]
mov eax, dword [0x41abf0]
cmp eax, dword [0x41abf8]
jbe 0x4082f4
mov byte [0x41acbc], 0
cmp byte [0x41acbd], 1
jbe 0x4088d0
cmp byte [0x41acbd], 2
jne 0x4084a6
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40849a
inc byte [0x41acbd]
jmp 0x4088d0
mov byte [0x41acbd], 0
jmp 0x4088d0
cmp byte [0x41acbd], 3
jne 0x4084d9
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419138], eax
jae 0x4084cd
inc byte [0x41acbd]
jmp 0x4088d0
mov byte [0x41acbd], 0
jmp 0x4088d0
cmp byte [0x41acbd], 4
jne 0x408501
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x4084f5
inc byte [0x41acbd]
jmp 0x4088d0
mov byte [0x41acbd], 0
jmp 0x4088d0
mov al, byte [0x41acbd]
cmp al, 0x1f
ja 0x408514
and eax, 0x7f
bt dword [0x408b0c], eax
jae 0x408535
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x408529
inc byte [0x41acbd]
jmp 0x4088d0
mov byte [0x41acbd], 0
jmp 0x4088d0
mov al, byte [0x41acbd]
cmp al, 0x1f
ja 0x408548
and eax, 0x7f
bt dword [0x408b10], eax
jae 0x408574
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x4190d8], eax
jae 0x408568
inc byte [0x41acbd]
jmp 0x4088d0
mov byte [0x41acbd], 0
jmp 0x4088d0
cmp byte [0x41acbd], 0x19
jne 0x4088d0
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x4190d8], eax
jae 0x4088d0
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x419118], eax
jae 0x4088d0
mov eax, dword [edi]
mov al, byte [eax + ebx - 0x1a]
and eax, 0xff
bt dword [0x419118], eax
jae 0x4088d0
xor eax, eax
mov al, byte [0x41acbd]
mov edx, ebx
sub edx, eax
mov dword [0x41abec], edx
mov byte [0x41acbd], 0
mov eax, dword [edi]
mov edx, dword [0x41abec]
lea edx, [eax + edx]
mov eax, 0x41ac24
mov ecx, 0x1a
call fcn.004032f8
lea edx, [ebp - 0x24]
mov eax, dword [0x41ac24]
call fcn.0040597c
mov edx, dword [ebp - 0x24]
mov eax, 0x41ac24
call fcn.0040325c
mov eax, dword [0x41ac24]
call fcn.00405a04
test al, al
je 0x4088d0
push dword [0x41ac14]
push 0x408a18
push 0x408b1c
mov eax, dword [0x41ac00]
add eax, dword [0x41abec]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x28]
call fcn.00404900
push dword [ebp - 0x28]
push 0x408ad0
push dword [0x41ac24]
mov eax, 0x41ac14
mov edx, 6
call fcn.0040344c
cmp dword [0x41abec], 0xc8
jbe 0x408687
mov eax, dword [0x41abec]
sub eax, 0xc8
mov dword [0x41abf4], eax
jmp 0x408691
mov dword [0x41abf4], 1
mov eax, dword [0x41abec]
add eax, 0xc8
mov dword [0x41abfc], eax
mov eax, dword [0x41abfc]
add eax, 0x2f
cmp eax, dword [0x41abe4]
jbe 0x4086ba
mov eax, dword [0x41abe4]
mov dword [0x41abfc], eax
mov eax, dword [0x41abf4]
cmp eax, dword [0x41abfc]
ja 0x4088c9
mov eax, 0x41ab68
mov edx, 0x408b2c
call fcn.0040325c
mov eax, dword [0x41abf4]
cmp eax, dword [0x41abec]
jbe 0x4086f5
cmp ebx, dword [0x41abf4]
jbe 0x4086f5
mov dword [0x41abf4], ebx
mov al, byte [0x41acbd]
cmp al, 0x2f
ja 0x408708
and eax, 0x7f
bt dword [0x408b40], eax
jae 0x40873a
mov eax, dword [edi]
mov edx, dword [0x41abf4]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x4190f8], eax
jae 0x40872e
inc byte [0x41acbd]
jmp 0x4088b2
mov byte [0x41acbd], 0
jmp 0x4088b2
mov al, byte [0x41acbd]
cmp al, 0x2f
ja 0x40874d
and eax, 0x7f
bt dword [0x408b48], eax
jae 0x408774
mov eax, dword [edi]
mov edx, dword [0x41abf4]
cmp byte [eax + edx], 0x20
jne 0x408768
inc byte [0x41acbd]
jmp 0x4088b2
mov byte [0x41acbd], 0
jmp 0x4088b2
cmp byte [0x41acbd], 0x2e
jne 0x4088b2
mov eax, 0x41ab68
mov edx, 0x408b58
call fcn.0040325c
mov eax, dword [edi]
mov edx, dword [0x41abf4]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x4190f8], eax
jae 0x40889c
mov eax, dword [edi]
mov edx, dword [0x41abf4]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x419118], eax
jae 0x40889c
mov eax, dword [edi]
mov edx, dword [0x41abf4]
mov al, byte [eax + edx - 0x2f]
and eax, 0xff
bt dword [0x419118], eax
jae 0x40889c
xor eax, eax
mov al, byte [0x41acbd]
mov edx, dword [0x41abf4]
sub edx, eax
mov eax, dword [edi]
lea edx, [eax + edx]
mov eax, 0x41ac28
mov ecx, 0x2f
call fcn.004032f8
lea edx, [ebp - 0x2c]
mov eax, dword [0x41ac28]
call fcn.0040597c
mov edx, dword [ebp - 0x2c]
mov eax, 0x41ac28
call fcn.0040325c
mov eax, dword [0x41ac28]
call fcn.00405a04
test al, al
je 0x40889c
mov edx, dword [0x41ac14]
mov eax, dword [0x41ac28]
call fcn.00403624
test eax, eax
jne 0x40889c
push dword [0x41ac14]
push 0x408adc
push 0x408bec
mov eax, dword [0x41ac00]
add eax, dword [0x41abf4]
xor edx, edx
mov dl, byte [0x41acbd]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x30]
call fcn.00404900
push dword [ebp - 0x30]
push 0x408ad0
push dword [0x41ac28]
mov eax, 0x41ac14
mov edx, 6
call fcn.0040344c
inc dword [0x41ac08]
mov byte [0x41acbd], 0
mov eax, 0x41ab68
mov edx, 0x408bfc
call fcn.0040325c
inc dword [0x41abf4]
mov eax, dword [0x41abf4]
cmp eax, dword [0x41abfc]
jbe 0x4086cb
mov byte [0x41acbd], 0
inc ebx
dec esi
jne 0x407ef3
mov eax, dword [0x41abe4]
add dword [0x41ac00], eax
push 0
push 0x41abe4
push 0x100000
mov eax, dword [edi]
inc eax
push eax
mov eax, dword [0x41abe0]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x40890f
cmp dword [0x41abe4], 0
ja 0x407ea5
cmp dword [0x41ac04], 0
jbe 0x408935
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41ac10]
push 0x408a18
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.0040344c
cmp dword [0x41ac08], 0
jbe 0x40895b
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41ac14]
push 0x408a18
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.0040344c
cmp dword [0x41ac0c], 0
jbe 0x408981
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41ac18]
push 0x408a18
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.0040344c
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.0040338c
cmp eax, 0xed800
jle 0x4089a7
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov ecx, 0xed800
xor edx, edx
call fcn.004035e4
mov eax, dword [0x41abe0]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4089dc
lea eax, [ebp - 0x30]
mov edx, 0xa
call fcn.0040322c
lea eax, [ebp - 4]
call fcn.00403208
ret