Function at 0x407acc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x407ad4
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, 0x41bcc0
xor eax, eax
push ebp
push 0x4087e6
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00407354
mov eax, dword [ebp - 8]
call fcn.00403208
xor ebx, ebx
mov eax, 0x41bb68
mov edx, 0x4087fc
call fcn.0040325c
mov eax, dword [ebp - 4]
call fcn.0040338c
cmp eax, 0x7f
jge 0x407b54
push 0
push 0x41bc34
mov eax, dword [ebp - 4]
call fcn.0040358c
push eax
call sub.kernel32.dll_OpenFile
mov dword [0x41bbe0], eax
cmp dword [0x41bbe0], 0xffffffff
jne 0x407b87
mov ebx, 1
jmp 0x407b87
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 [0x41bbe0], eax
cmp dword [0x41bbe0], 0xffffffff
jne 0x407b87
mov ebx, 2
test ebx, ebx
jbe 0x407beb
call sub.kernel32.dll_GetLastError
mov ebx, eax
mov eax, ebx
cmp eax, 0xcf
ja 0x407ba2
bt dword [0x4088c4], eax
jb 0x407bdb
cmp ebx, 0x4cf
je 0x407bdb
push 0x4088e8
push dword [ebp - 4]
push 0x4088f8
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.00410138
mov eax, dword [0x41bbe0]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x4087c3
mov eax, 0x41bc10
call fcn.00403208
mov eax, 0x41bc14
call fcn.00403208
mov eax, 0x41bc18
call fcn.00403208
xor eax, eax
mov dword [0x41bc04], eax
xor eax, eax
mov dword [0x41bc08], eax
mov eax, 0x41bb68
mov edx, 0x408904
call fcn.0040325c
xor eax, eax
mov dword [0x41bc0c], eax
xor eax, eax
mov dword [0x41bc00], eax
mov eax, 0x41bc1c
mov edx, 0x12
call fcn.0040366c
mov eax, 0x41bc20
mov edx, 0x20
call fcn.0040366c
mov eax, 0x41bc24
mov edx, 0x1a
call fcn.0040366c
mov eax, 0x41bc28
mov edx, 0x2f
call fcn.0040366c
mov eax, 0x41bc2c
mov edx, 0x12
call fcn.0040366c
mov eax, 0x41bc30
mov edx, 0x20
call fcn.0040366c
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x4086d6
cmp dword [0x41bbe4], 0x32
jb 0x408702
cmp dword [0x41bbe4], 0x100000
jae 0x407cbe
mov eax, dword [edi]
mov edx, dword [0x41bbe4]
mov byte [eax + edx + 1], 0
mov byte [0x41bcbc], 0
mov byte [0x41bcbd], 0
mov byte [0x41bcbe], 0
mov esi, dword [0x41bbe4]
test esi, esi
jbe 0x4086cb
mov ebx, 1
cmp byte [0x41bcbe], 0
jne 0x407d06
mov eax, dword [edi]
cmp byte [eax + ebx], 8
jne 0x407ebd
inc byte [0x41bcbe]
jmp 0x407ebd
cmp byte [0x41bcbe], 1
jne 0x407d4d
mov eax, dword [edi]
mov al, byte [eax + ebx]
mov edx, eax
and dl, 0xf
cmp dl, 9
jne 0x407d41
and eax, 0xff
shr eax, 4
cmp eax, 0xff
ja 0x407d34
bt dword [0x41a158], eax
jae 0x407d41
inc byte [0x41bcbe]
jmp 0x407ebd
mov byte [0x41bcbe], 0
jmp 0x407ebd
cmp byte [0x41bcbe], 1
jbe 0x407d8d
cmp byte [0x41bcbe], 9
jae 0x407d8d
mov eax, dword [edi]
mov al, byte [eax + ebx]
xor edx, edx
mov dl, al
shr edx, 4
cmp edx, 0xa
jae 0x407d81
and al, 0xf
cmp al, 0xa
jae 0x407d81
inc byte [0x41bcbe]
jmp 0x407ebd
mov byte [0x41bcbe], 0
jmp 0x407ebd
mov al, byte [0x41bcbe]
add al, 0xf7
sub al, 7
jae 0x407db7
mov eax, dword [edi]
cmp byte [eax + ebx], 0
jne 0x407dab
inc byte [0x41bcbe]
jmp 0x407ebd
mov byte [0x41bcbe], 0
jmp 0x407ebd
cmp byte [0x41bcbe], 0x10
jne 0x407ebd
mov eax, dword [0x41bc2c]
call fcn.0040358c
mov edx, eax
xor eax, eax
mov al, byte [0x41bcbe]
mov ecx, ebx
sub ecx, eax
mov eax, dword [edi]
add eax, ecx
mov ecx, 9
call fcn.00405a68
mov eax, dword [0x41bc2c]
call fcn.00405a04
test al, al
je 0x407eb6
mov eax, dword [0x41bc30]
call fcn.0040358c
mov edx, eax
mov eax, dword [edi]
add eax, ebx
mov ecx, 0x10
call fcn.00405a68
mov eax, dword [0x41bc30]
call fcn.00405a04
test al, al
je 0x407eb6
mov edx, dword [0x41bc18]
mov eax, dword [0x41bc30]
call fcn.00403624
test eax, eax
jne 0x407eb6
push dword [0x41bc18]
push 0x4088f8
push 0x4089c8
mov eax, dword [0x41bc00]
add eax, ebx
xor edx, edx
mov dl, byte [0x41bcbe]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x14]
call fcn.00404900
push dword [ebp - 0x14]
push 0x4089d8
push dword [0x41bc2c]
push 0x4089e4
push 0x4089f0
mov eax, dword [0x41bc00]
add eax, ebx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18]
call fcn.00404900
push dword [ebp - 0x18]
push 0x4089d8
push dword [0x41bc30]
mov eax, 0x41bc18
mov edx, 0xb
call fcn.0040344c
inc dword [0x41bc0c]
mov byte [0x41bcbe], 0
cmp byte [0x41bcbc], 0
jne 0x407edd
mov eax, dword [edi]
cmp byte [eax + ebx], 0x30
jne 0x408264
inc byte [0x41bcbc]
jmp 0x408264
cmp byte [0x41bcbc], 1
jne 0x407f13
mov eax, dword [edi]
cmp byte [eax + ebx], 0x38
jne 0x407f00
inc byte [0x41bcbc]
mov byte [0x41bcbd], 2
jmp 0x4086c3
mov byte [0x41bcbc], 0
mov byte [0x41bcbd], 0
jmp 0x408264
cmp byte [0x41bcbc], 2
jne 0x407f5a
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x41a138], eax
jae 0x407f4e
mov eax, dword [edi]
mov al, byte [eax + ebx - 3]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x407f4e
inc byte [0x41bcbc]
jmp 0x408264
mov byte [0x41bcbc], 0
jmp 0x408264
cmp byte [0x41bcbc], 3
jne 0x407f82
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x407f76
inc byte [0x41bcbc]
jmp 0x408264
mov byte [0x41bcbc], 0
jmp 0x408264
cmp byte [0x41bcbc], 3
jbe 0x407fbe
cmp byte [0x41bcbc], 0x11
jae 0x407fbe
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x41a0d8], eax
jae 0x407fb2
inc byte [0x41bcbc]
jmp 0x408264
mov byte [0x41bcbc], 0
jmp 0x408264
cmp byte [0x41bcbc], 0x11
jne 0x408264
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x41a0d8], eax
jae 0x408264
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x408264
xor eax, eax
mov al, byte [0x41bcbc]
mov edx, ebx
sub edx, eax
mov dword [0x41bbe8], edx
mov byte [0x41bcbc], 0
mov eax, 0x41bc1c
call fcn.004035dc
mov edx, dword [edi]
mov ecx, dword [0x41bbe8]
add edx, ecx
mov ecx, 0x12
call fcn.004043ec
mov eax, dword [0x41bc1c]
call fcn.00405a04
test al, al
je 0x408264
push dword [0x41bc10]
push 0x4088f8
push 0x408a00
mov eax, dword [0x41bc00]
add eax, dword [0x41bbe8]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1c]
call fcn.00404900
push dword [ebp - 0x1c]
push 0x4089d8
push dword [0x41bc1c]
mov eax, 0x41bc10
mov edx, 6
call fcn.0040344c
cmp dword [0x41bbe8], 0xc8
jbe 0x4080a3
mov eax, dword [0x41bbe8]
sub eax, 0xc8
mov dword [0x41bbf0], eax
jmp 0x4080ad
mov dword [0x41bbf0], 1
mov eax, dword [0x41bbe8]
add eax, 0xc8
mov dword [0x41bbf8], eax
mov eax, dword [0x41bbf8]
add eax, 0x20
cmp eax, dword [0x41bbe4]
jbe 0x4080d6
mov eax, dword [0x41bbe4]
mov dword [0x41bbf8], eax
mov eax, dword [0x41bbf0]
cmp eax, dword [0x41bbf8]
ja 0x40825d
mov eax, dword [0x41bbf0]
cmp eax, dword [0x41bbe8]
jbe 0x408102
cmp ebx, dword [0x41bbf0]
jbe 0x408102
mov dword [0x41bbf0], ebx
cmp byte [0x41bcbc], 0x1f
jae 0x40813b
mov eax, dword [edi]
mov edx, dword [0x41bbf0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x41a0f8], eax
jae 0x40812f
inc byte [0x41bcbc]
jmp 0x408246
mov byte [0x41bcbc], 0
jmp 0x408246
cmp byte [0x41bcbc], 0x1f
jne 0x408246
mov eax, dword [edi]
mov edx, dword [0x41bbf0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x41a0f8], eax
jae 0x40823f
mov eax, dword [edi]
mov edx, dword [0x41bbf0]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x40823f
mov eax, dword [edi]
mov edx, dword [0x41bbf0]
mov al, byte [eax + edx - 0x20]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x40823f
mov eax, 0x41bc20
call fcn.004035dc
xor edx, edx
mov dl, byte [0x41bcbc]
mov ecx, dword [0x41bbf0]
sub ecx, edx
mov edx, dword [edi]
add edx, ecx
mov ecx, 0x20
call fcn.004043ec
mov eax, dword [0x41bc20]
call fcn.00405a04
test al, al
je 0x40823f
mov edx, dword [0x41bc10]
mov eax, dword [0x41bc20]
call fcn.00403624
test eax, eax
jne 0x40823f
push dword [0x41bc10]
push 0x4089e4
push 0x408a10
mov eax, dword [0x41bc00]
add eax, dword [0x41bbf0]
xor edx, edx
mov dl, byte [0x41bcbc]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x20]
call fcn.00404900
push dword [ebp - 0x20]
push 0x4089d8
push dword [0x41bc20]
mov eax, 0x41bc10
mov edx, 6
call fcn.0040344c
inc dword [0x41bc04]
mov byte [0x41bcbc], 0
inc dword [0x41bbf0]
mov eax, dword [0x41bbf0]
cmp eax, dword [0x41bbf8]
jbe 0x4080e7
mov byte [0x41bcbc], 0
cmp byte [0x41bcbd], 1
jbe 0x4086c3
cmp byte [0x41bcbd], 2
jne 0x408299
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40828d
inc byte [0x41bcbd]
jmp 0x4086c3
mov byte [0x41bcbd], 0
jmp 0x4086c3
cmp byte [0x41bcbd], 3
jne 0x4082cc
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x41a138], eax
jae 0x4082c0
inc byte [0x41bcbd]
jmp 0x4086c3
mov byte [0x41bcbd], 0
jmp 0x4086c3
cmp byte [0x41bcbd], 4
jne 0x4082f4
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x4082e8
inc byte [0x41bcbd]
jmp 0x4086c3
mov byte [0x41bcbd], 0
jmp 0x4086c3
mov al, byte [0x41bcbd]
cmp al, 0x1f
ja 0x408307
and eax, 0x7f
bt dword [0x408a14], eax
jae 0x408328
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40831c
inc byte [0x41bcbd]
jmp 0x4086c3
mov byte [0x41bcbd], 0
jmp 0x4086c3
mov al, byte [0x41bcbd]
cmp al, 0x1f
ja 0x40833b
and eax, 0x7f
bt dword [0x408a18], eax
jae 0x408367
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x41a0d8], eax
jae 0x40835b
inc byte [0x41bcbd]
jmp 0x4086c3
mov byte [0x41bcbd], 0
jmp 0x4086c3
cmp byte [0x41bcbd], 0x19
jne 0x4086c3
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x41a0d8], eax
jae 0x4086c3
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x4086c3
mov eax, dword [edi]
mov al, byte [eax + ebx - 0x1a]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x4086c3
xor eax, eax
mov al, byte [0x41bcbd]
mov edx, ebx
sub edx, eax
mov dword [0x41bbec], edx
mov byte [0x41bcbd], 0
mov eax, dword [edi]
mov edx, dword [0x41bbec]
lea edx, [eax + edx]
mov eax, 0x41bc24
mov ecx, 0x1a
call fcn.004032f8
lea edx, [ebp - 0x24]
mov eax, dword [0x41bc24]
call fcn.0040597c
mov edx, dword [ebp - 0x24]
mov eax, 0x41bc24
call fcn.0040325c
mov eax, dword [0x41bc24]
call fcn.00405a04
test al, al
je 0x4086c3
push dword [0x41bc14]
push 0x4088f8
push 0x408a24
mov eax, dword [0x41bc00]
add eax, dword [0x41bbec]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x28]
call fcn.00404900
push dword [ebp - 0x28]
push 0x4089d8
push dword [0x41bc24]
mov eax, 0x41bc14
mov edx, 6
call fcn.0040344c
cmp dword [0x41bbec], 0xc8
jbe 0x40847a
mov eax, dword [0x41bbec]
sub eax, 0xc8
mov dword [0x41bbf4], eax
jmp 0x408484
mov dword [0x41bbf4], 1
mov eax, dword [0x41bbec]
add eax, 0xc8
mov dword [0x41bbfc], eax
mov eax, dword [0x41bbfc]
add eax, 0x2f
cmp eax, dword [0x41bbe4]
jbe 0x4084ad
mov eax, dword [0x41bbe4]
mov dword [0x41bbfc], eax
mov eax, dword [0x41bbf4]
cmp eax, dword [0x41bbfc]
ja 0x4086bc
mov eax, dword [0x41bbf4]
cmp eax, dword [0x41bbec]
jbe 0x4084d9
cmp ebx, dword [0x41bbf4]
jbe 0x4084d9
mov dword [0x41bbf4], ebx
mov al, byte [0x41bcbd]
cmp al, 0x2f
ja 0x4084ec
and eax, 0x7f
bt dword [0x408a2c], eax
jae 0x40851e
mov eax, dword [edi]
mov edx, dword [0x41bbf4]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x41a0f8], eax
jae 0x408512
inc byte [0x41bcbd]
jmp 0x408696
mov byte [0x41bcbd], 0
jmp 0x408696
mov al, byte [0x41bcbd]
cmp al, 0x2f
ja 0x408531
and eax, 0x7f
bt dword [0x408a34], eax
jae 0x408558
mov eax, dword [edi]
mov edx, dword [0x41bbf4]
cmp byte [eax + edx], 0x20
jne 0x40854c
inc byte [0x41bcbd]
jmp 0x408696
mov byte [0x41bcbd], 0
jmp 0x408696
cmp byte [0x41bcbd], 0x2e
jne 0x408696
mov eax, 0x41bb68
mov edx, 0x408a44
call fcn.0040325c
mov eax, dword [edi]
mov edx, dword [0x41bbf4]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x41a0f8], eax
jae 0x408680
mov eax, dword [edi]
mov edx, dword [0x41bbf4]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x408680
mov eax, dword [edi]
mov edx, dword [0x41bbf4]
mov al, byte [eax + edx - 0x2f]
and eax, 0xff
bt dword [0x41a118], eax
jae 0x408680
xor eax, eax
mov al, byte [0x41bcbd]
mov edx, dword [0x41bbf4]
sub edx, eax
mov eax, dword [edi]
lea edx, [eax + edx]
mov eax, 0x41bc28
mov ecx, 0x2f
call fcn.004032f8
lea edx, [ebp - 0x2c]
mov eax, dword [0x41bc28]
call fcn.0040597c
mov edx, dword [ebp - 0x2c]
mov eax, 0x41bc28
call fcn.0040325c
mov eax, dword [0x41bc28]
call fcn.00405a04
test al, al
je 0x408680
mov edx, dword [0x41bc14]
mov eax, dword [0x41bc28]
call fcn.00403624
test eax, eax
jne 0x408680
push dword [0x41bc14]
push 0x4089e4
push 0x408acc
mov eax, dword [0x41bc00]
add eax, dword [0x41bbf4]
xor edx, edx
mov dl, byte [0x41bcbd]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x30]
call fcn.00404900
push dword [ebp - 0x30]
push 0x4089d8
push dword [0x41bc28]
mov eax, 0x41bc14
mov edx, 6
call fcn.0040344c
inc dword [0x41bc08]
mov byte [0x41bcbd], 0
mov eax, 0x41bb68
mov edx, 0x408adc
call fcn.0040325c
inc dword [0x41bbf4]
mov eax, 0x41bb68
mov edx, 0x408b68
call fcn.0040325c
mov eax, dword [0x41bbf4]
cmp eax, dword [0x41bbfc]
jbe 0x4084be
mov byte [0x41bcbd], 0
inc ebx
dec esi
jne 0x407ce6
mov eax, dword [0x41bbe4]
add dword [0x41bc00], eax
push 0
push 0x41bbe4
push 0x100000
mov eax, dword [edi]
inc eax
push eax
mov eax, dword [0x41bbe0]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x408702
cmp dword [0x41bbe4], 0
ja 0x407c98
cmp dword [0x41bc04], 0
jbe 0x408728
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41bc10]
push 0x4088f8
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.0040344c
cmp dword [0x41bc08], 0
jbe 0x40874e
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41bc14]
push 0x4088f8
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.0040344c
cmp dword [0x41bc0c], 0
jbe 0x408774
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41bc18]
push 0x4088f8
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.0040344c
mov eax, 0x41bb68
mov edx, 0x408ba4
call fcn.0040325c
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.0040338c
cmp eax, 0xed800
jle 0x4087a9
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 [0x41bbe0]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0x41bb68
mov edx, 0x408c64
call fcn.0040325c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4087ed
lea eax, [ebp - 0x30]
mov edx, 0xa
call fcn.0040322c
lea eax, [ebp - 4]
call fcn.00403208
ret