Function at 0x40ac20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x40ac28
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a84
mov edi, 0x41ac6c
xor eax, eax
push ebp
push 0x40b93a
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00407ebc
mov eax, dword [ebp - 8]
call fcn.0040371c
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.00403894
cmp eax, 0x7f
jge 0x40ac99
push 0
push 0x41abe0
mov eax, dword [ebp - 4]
call fcn.00403a94
push eax
call sub.kernel32.dll_OpenFile
mov dword [0x41ab8c], eax
cmp dword [0x41ab8c], 0xffffffff
jne 0x40accc
mov ebx, 1
jmp 0x40accc
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.00403a94
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [0x41ab8c], eax
cmp dword [0x41ab8c], 0xffffffff
jne 0x40accc
mov ebx, 2
test ebx, ebx
jbe 0x40ad3f
mov eax, 0x41ab14
mov edx, 0x40b950
call fcn.00403770
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
cmp eax, 0xcf
ja 0x40acf6
bt dword [0x40b9c4], eax
jb 0x40ad2f
cmp ebx, 0x4cf
je 0x40ad2f
push 0x40b9e8
push dword [ebp - 4]
push 0x40b9f8
lea edx, [ebp - 0x10]
mov eax, ebx
call fcn.0040623c
push dword [ebp - 0x10]
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0xc]
call fcn.004170e8
mov eax, dword [0x41ab8c]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x40b917
mov eax, 0x41abbc
call fcn.0040371c
mov eax, 0x41abc0
call fcn.0040371c
mov eax, 0x41abc4
call fcn.0040371c
xor eax, eax
mov dword [0x41abb0], eax
xor eax, eax
mov dword [0x41abb4], eax
mov eax, 0x41ab14
mov edx, 0x40ba04
call fcn.00403770
xor eax, eax
mov dword [0x41abb8], eax
xor eax, eax
mov dword [0x41abac], eax
mov eax, 0x41abc8
mov edx, 0x12
call fcn.00403bc4
mov eax, 0x41abcc
mov edx, 0x20
call fcn.00403bc4
mov eax, 0x41abd0
mov edx, 0x1a
call fcn.00403bc4
mov eax, 0x41abd4
mov edx, 0x2f
call fcn.00403bc4
mov eax, 0x41abd8
mov edx, 0x12
call fcn.00403bc4
mov eax, 0x41abdc
mov edx, 0x20
call fcn.00403bc4
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x40b848
cmp dword [0x41ab90], 0x32
jb 0x40b874
cmp dword [0x41ab90], 0x100000
jae 0x40ae12
mov eax, dword [edi]
mov edx, dword [0x41ab90]
mov byte [eax + edx + 1], 0
mov byte [0x41ac68], 0
mov byte [0x41ac69], 0
mov byte [0x41ac6a], 0
mov esi, dword [0x41ab90]
test esi, esi
jbe 0x40b83d
mov ebx, 1
cmp byte [0x41ac6a], 0
jne 0x40ae5a
mov eax, dword [edi]
cmp byte [eax + ebx], 8
jne 0x40b020
inc byte [0x41ac6a]
jmp 0x40b020
cmp byte [0x41ac6a], 1
jne 0x40aea1
mov eax, dword [edi]
mov al, byte [eax + ebx]
mov edx, eax
and dl, 0xf
cmp dl, 9
jne 0x40ae95
and eax, 0xff
shr eax, 4
cmp eax, 0xff
ja 0x40ae88
bt dword [0x4191b8], eax
jae 0x40ae95
inc byte [0x41ac6a]
jmp 0x40b020
mov byte [0x41ac6a], 0
jmp 0x40b020
cmp byte [0x41ac6a], 1
jbe 0x40aee1
cmp byte [0x41ac6a], 9
jae 0x40aee1
mov eax, dword [edi]
mov al, byte [eax + ebx]
xor edx, edx
mov dl, al
shr edx, 4
cmp edx, 0xa
jae 0x40aed5
and al, 0xf
cmp al, 0xa
jae 0x40aed5
inc byte [0x41ac6a]
jmp 0x40b020
mov byte [0x41ac6a], 0
jmp 0x40b020
mov al, byte [0x41ac6a]
add al, 0xf7
sub al, 7
jae 0x40af0b
mov eax, dword [edi]
cmp byte [eax + ebx], 0
jne 0x40aeff
inc byte [0x41ac6a]
jmp 0x40b020
mov byte [0x41ac6a], 0
jmp 0x40b020
cmp byte [0x41ac6a], 0x10
jne 0x40b020
mov eax, 0x41ab14
mov edx, 0x40bacc
call fcn.00403770
mov eax, dword [0x41abd8]
call fcn.00403a94
mov edx, eax
xor eax, eax
mov al, byte [0x41ac6a]
mov ecx, ebx
sub ecx, eax
mov eax, dword [edi]
add eax, ecx
mov ecx, 9
call fcn.004064cc
mov eax, dword [0x41abd8]
call fcn.00406468
test al, al
je 0x40b019
mov eax, dword [0x41abdc]
call fcn.00403a94
mov edx, eax
mov eax, dword [edi]
add eax, ebx
mov ecx, 0x10
call fcn.004064cc
mov eax, dword [0x41abdc]
call fcn.00406468
test al, al
je 0x40b019
mov edx, dword [0x41abc4]
mov eax, dword [0x41abdc]
call fcn.00403b7c
test eax, eax
jne 0x40b019
push dword [0x41abc4]
push 0x40b9f8
push 0x40bb2c
mov eax, dword [0x41abac]
add eax, ebx
xor edx, edx
mov dl, byte [0x41ac6a]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x14]
call fcn.00405370
push dword [ebp - 0x14]
push 0x40bb3c
push dword [0x41abd8]
push 0x40bb48
push 0x40bb54
mov eax, dword [0x41abac]
add eax, ebx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18]
call fcn.00405370
push dword [ebp - 0x18]
push 0x40bb3c
push dword [0x41abdc]
mov eax, 0x41abc4
mov edx, 0xb
call fcn.00403954
inc dword [0x41abb8]
mov byte [0x41ac6a], 0
cmp byte [0x41ac68], 0
jne 0x40b040
mov eax, dword [edi]
cmp byte [eax + ebx], 0x30
jne 0x40b3c7
inc byte [0x41ac68]
jmp 0x40b3c7
cmp byte [0x41ac68], 1
jne 0x40b076
mov eax, dword [edi]
cmp byte [eax + ebx], 0x38
jne 0x40b063
inc byte [0x41ac68]
mov byte [0x41ac69], 2
jmp 0x40b835
mov byte [0x41ac68], 0
mov byte [0x41ac69], 0
jmp 0x40b3c7
cmp byte [0x41ac68], 2
jne 0x40b0bd
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419198], eax
jae 0x40b0b1
mov eax, dword [edi]
mov al, byte [eax + ebx - 3]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b0b1
inc byte [0x41ac68]
jmp 0x40b3c7
mov byte [0x41ac68], 0
jmp 0x40b3c7
cmp byte [0x41ac68], 3
jne 0x40b0e5
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x40b0d9
inc byte [0x41ac68]
jmp 0x40b3c7
mov byte [0x41ac68], 0
jmp 0x40b3c7
cmp byte [0x41ac68], 3
jbe 0x40b121
cmp byte [0x41ac68], 0x11
jae 0x40b121
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419138], eax
jae 0x40b115
inc byte [0x41ac68]
jmp 0x40b3c7
mov byte [0x41ac68], 0
jmp 0x40b3c7
cmp byte [0x41ac68], 0x11
jne 0x40b3c7
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419138], eax
jae 0x40b3c7
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b3c7
xor eax, eax
mov al, byte [0x41ac68]
mov edx, ebx
sub edx, eax
mov dword [0x41ab94], edx
mov byte [0x41ac68], 0
mov eax, 0x41abc8
call fcn.00403aec
mov edx, dword [edi]
mov ecx, dword [0x41ab94]
add edx, ecx
mov ecx, 0x12
call fcn.0040493c
mov eax, dword [0x41abc8]
call fcn.00406468
test al, al
je 0x40b3c7
push dword [0x41abbc]
push 0x40b9f8
push 0x40bb64
mov eax, dword [0x41abac]
add eax, dword [0x41ab94]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1c]
call fcn.00405370
push dword [ebp - 0x1c]
push 0x40bb3c
push dword [0x41abc8]
mov eax, 0x41abbc
mov edx, 6
call fcn.00403954
cmp dword [0x41ab94], 0xc8
jbe 0x40b206
mov eax, dword [0x41ab94]
sub eax, 0xc8
mov dword [0x41ab9c], eax
jmp 0x40b210
mov dword [0x41ab9c], 1
mov eax, dword [0x41ab94]
add eax, 0xc8
mov dword [0x41aba4], eax
mov eax, dword [0x41aba4]
add eax, 0x20
cmp eax, dword [0x41ab90]
jbe 0x40b239
mov eax, dword [0x41ab90]
mov dword [0x41aba4], eax
mov eax, dword [0x41ab9c]
cmp eax, dword [0x41aba4]
ja 0x40b3c0
mov eax, dword [0x41ab9c]
cmp eax, dword [0x41ab94]
jbe 0x40b265
cmp ebx, dword [0x41ab9c]
jbe 0x40b265
mov dword [0x41ab9c], ebx
cmp byte [0x41ac68], 0x1f
jae 0x40b29e
mov eax, dword [edi]
mov edx, dword [0x41ab9c]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x419158], eax
jae 0x40b292
inc byte [0x41ac68]
jmp 0x40b3a9
mov byte [0x41ac68], 0
jmp 0x40b3a9
cmp byte [0x41ac68], 0x1f
jne 0x40b3a9
mov eax, dword [edi]
mov edx, dword [0x41ab9c]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x419158], eax
jae 0x40b3a2
mov eax, dword [edi]
mov edx, dword [0x41ab9c]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b3a2
mov eax, dword [edi]
mov edx, dword [0x41ab9c]
mov al, byte [eax + edx - 0x20]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b3a2
mov eax, 0x41abcc
call fcn.00403aec
xor edx, edx
mov dl, byte [0x41ac68]
mov ecx, dword [0x41ab9c]
sub ecx, edx
mov edx, dword [edi]
add edx, ecx
mov ecx, 0x20
call fcn.0040493c
mov eax, dword [0x41abcc]
call fcn.00406468
test al, al
je 0x40b3a2
mov edx, dword [0x41abbc]
mov eax, dword [0x41abcc]
call fcn.00403b7c
test eax, eax
jne 0x40b3a2
push dword [0x41abbc]
push 0x40bb48
push 0x40bb74
mov eax, dword [0x41abac]
add eax, dword [0x41ab9c]
xor edx, edx
mov dl, byte [0x41ac68]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x20]
call fcn.00405370
push dword [ebp - 0x20]
push 0x40bb3c
push dword [0x41abcc]
mov eax, 0x41abbc
mov edx, 6
call fcn.00403954
inc dword [0x41abb0]
mov byte [0x41ac68], 0
inc dword [0x41ab9c]
mov eax, dword [0x41ab9c]
cmp eax, dword [0x41aba4]
jbe 0x40b24a
mov byte [0x41ac68], 0
cmp byte [0x41ac69], 1
jbe 0x40b835
cmp byte [0x41ac69], 2
jne 0x40b3fc
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40b3f0
inc byte [0x41ac69]
jmp 0x40b835
mov byte [0x41ac69], 0
jmp 0x40b835
cmp byte [0x41ac69], 3
jne 0x40b42f
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419198], eax
jae 0x40b423
inc byte [0x41ac69]
jmp 0x40b835
mov byte [0x41ac69], 0
jmp 0x40b835
cmp byte [0x41ac69], 4
jne 0x40b457
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x40b44b
inc byte [0x41ac69]
jmp 0x40b835
mov byte [0x41ac69], 0
jmp 0x40b835
mov al, byte [0x41ac69]
cmp al, 0x1f
ja 0x40b46a
and eax, 0x7f
bt dword [0x40bb78], eax
jae 0x40b48b
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40b47f
inc byte [0x41ac69]
jmp 0x40b835
mov byte [0x41ac69], 0
jmp 0x40b835
mov al, byte [0x41ac69]
cmp al, 0x1f
ja 0x40b49e
and eax, 0x7f
bt dword [0x40bb7c], eax
jae 0x40b4ca
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419138], eax
jae 0x40b4be
inc byte [0x41ac69]
jmp 0x40b835
mov byte [0x41ac69], 0
jmp 0x40b835
cmp byte [0x41ac69], 0x19
jne 0x40b835
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x419138], eax
jae 0x40b835
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b835
mov eax, dword [edi]
mov al, byte [eax + ebx - 0x1a]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b835
xor eax, eax
mov al, byte [0x41ac69]
mov edx, ebx
sub edx, eax
mov dword [0x41ab98], edx
mov byte [0x41ac69], 0
mov eax, dword [edi]
mov edx, dword [0x41ab98]
lea edx, [eax + edx]
mov eax, 0x41abd0
mov ecx, 0x1a
call fcn.0040380c
lea edx, [ebp - 0x24]
mov eax, dword [0x41abd0]
call fcn.004063e0
mov edx, dword [ebp - 0x24]
mov eax, 0x41abd0
call fcn.00403770
mov eax, dword [0x41abd0]
call fcn.00406468
test al, al
je 0x40b835
push dword [0x41abc0]
push 0x40b9f8
push 0x40bb88
mov eax, dword [0x41abac]
add eax, dword [0x41ab98]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x28]
call fcn.00405370
push dword [ebp - 0x28]
push 0x40bb3c
push dword [0x41abd0]
mov eax, 0x41abc0
mov edx, 6
call fcn.00403954
cmp dword [0x41ab98], 0xc8
jbe 0x40b5dd
mov eax, dword [0x41ab98]
sub eax, 0xc8
mov dword [0x41aba0], eax
jmp 0x40b5e7
mov dword [0x41aba0], 1
mov eax, dword [0x41ab98]
add eax, 0xc8
mov dword [0x41aba8], eax
mov eax, dword [0x41aba8]
add eax, 0x2f
cmp eax, dword [0x41ab90]
jbe 0x40b610
mov eax, dword [0x41ab90]
mov dword [0x41aba8], eax
mov eax, dword [0x41aba0]
cmp eax, dword [0x41aba8]
ja 0x40b82e
mov eax, 0x41ab14
mov edx, 0x40bb98
call fcn.00403770
inc eax
cmp edi, 0xaba0a1ff
inc ecx
add byte [ebx], bh
add eax, 0x41ab98
jbe 0x40b64b
cmp ebx, dword [0x41aba0]
jbe 0x40b64b
mov dword [0x41aba0], ebx
mov al, byte [0x41ac69]
cmp al, 0x2f
ja 0x40b65e
and eax, 0x7f
bt dword [0x40bbfc], eax
jae 0x40b690
mov eax, dword [edi]
mov edx, dword [0x41aba0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x419158], eax
jae 0x40b684
inc byte [0x41ac69]
jmp 0x40b808
mov byte [0x41ac69], 0
jmp 0x40b808
mov al, byte [0x41ac69]
cmp al, 0x2f
ja 0x40b6a3
and eax, 0x7f
bt dword [0x40bc04], eax
jae 0x40b6ca
mov eax, dword [edi]
mov edx, dword [0x41aba0]
cmp byte [eax + edx], 0x20
jne 0x40b6be
inc byte [0x41ac69]
jmp 0x40b808
mov byte [0x41ac69], 0
jmp 0x40b808
cmp byte [0x41ac69], 0x2e
jne 0x40b808
mov eax, 0x41ab14
mov edx, 0x40bc14
call fcn.00403770
mov eax, dword [edi]
mov edx, dword [0x41aba0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x419158], eax
jae 0x40b7f2
mov eax, dword [edi]
mov edx, dword [0x41aba0]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b7f2
mov eax, dword [edi]
mov edx, dword [0x41aba0]
mov al, byte [eax + edx - 0x2f]
and eax, 0xff
bt dword [0x419178], eax
jae 0x40b7f2
xor eax, eax
mov al, byte [0x41ac69]
mov edx, dword [0x41aba0]
sub edx, eax
mov eax, dword [edi]
lea edx, [eax + edx]
mov eax, 0x41abd4
mov ecx, 0x2f
call fcn.0040380c
lea edx, [ebp - 0x2c]
mov eax, dword [0x41abd4]
call fcn.004063e0
mov edx, dword [ebp - 0x2c]
mov eax, 0x41abd4
call fcn.00403770
mov eax, dword [0x41abd4]
call fcn.00406468
test al, al
je 0x40b7f2
mov edx, dword [0x41abc0]
mov eax, dword [0x41abd4]
call fcn.00403b7c
test eax, eax
jne 0x40b7f2
push dword [0x41abc0]
push 0x40bb48
push 0x40bc8c
mov eax, dword [0x41abac]
add eax, dword [0x41aba0]
xor edx, edx
mov dl, byte [0x41ac69]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x30]
call fcn.00405370
push dword [ebp - 0x30]
push 0x40bb3c
push dword [0x41abd4]
mov eax, 0x41abc0
mov edx, 6
call fcn.00403954
inc dword [0x41abb4]
mov byte [0x41ac69], 0
mov eax, 0x41ab14
mov edx, 0x40bc9c
call fcn.00403770
inc dword [0x41aba0]
mov eax, 0x41ab14
mov edx, 0x40bcf0
call fcn.00403770
mov eax, dword [0x41aba0]
cmp eax, dword [0x41aba8]
jbe 0x40b621
mov byte [0x41ac69], 0
inc ebx
dec esi
jne 0x40ae3a
mov eax, dword [0x41ab90]
add dword [0x41abac], eax
push 0
push 0x41ab90
push 0x100000
mov eax, dword [edi]
inc eax
push eax
mov eax, dword [0x41ab8c]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x40b874
cmp dword [0x41ab90], 0
ja 0x40adec
cmp dword [0x41abb0], 0
jbe 0x40b89a
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41abbc]
push 0x40b9f8
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.00403954
cmp dword [0x41abb4], 0
jbe 0x40b8c0
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41abc0]
push 0x40b9f8
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.00403954
cmp dword [0x41abb8], 0
jbe 0x40b8e6
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41abc4]
push 0x40b9f8
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.00403954
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.00403894
cmp eax, 0xed800
jle 0x40b90c
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov ecx, 0xed800
xor edx, edx
call fcn.00403af4
mov eax, dword [0x41ab8c]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b941
lea eax, [ebp - 0x30]
mov edx, 0xa
call fcn.00403740
lea eax, [ebp - 4]
call fcn.0040371c
ret