Function at 0x40d4b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x40d4b8
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004044f8
mov edi, 0x42ac8c
xor eax, eax
push ebp
push 0x40e1f7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x42ab30
mov edx, 0x40e210
call fcn.004040c0
call fcn.00409b70
mov eax, dword [ebp - 8]
call fcn.0040406c
xor ebx, ebx
mov eax, 0x42ab30
mov edx, 0x40e28c
call fcn.004040c0
mov eax, dword [ebp - 4]
call fcn.00404308
cmp eax, 0x7f
jge 0x40d547
push 0
push 0x42ac00
mov eax, dword [ebp - 4]
call fcn.00404508
push eax
call sub.kernel32.dll_OpenFile
mov dword [0x42abac], eax
cmp dword [0x42abac], 0xffffffff
jne 0x40d57a
mov ebx, 1
jmp 0x40d57a
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.00404508
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [0x42abac], eax
cmp dword [0x42abac], 0xffffffff
jne 0x40d57a
mov ebx, 2
test ebx, ebx
jbe 0x40d5de
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
cmp eax, 0xcf
ja 0x40d595
bt dword [0x40e32c], eax
jb 0x40d5ce
cmp ebx, 0x4cf
je 0x40d5ce
push 0x40e350
push dword [ebp - 4]
push 0x40e360
lea edx, [ebp - 0x10]
mov eax, ebx
call fcn.0040780c
push dword [ebp - 0x10]
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.004043c8
mov eax, dword [ebp - 0xc]
call fcn.0041b548
mov eax, dword [0x42abac]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x40e1d4
mov eax, 0x42ab30
mov edx, 0x40e36c
call fcn.004040c0
mov eax, 0x42abdc
call fcn.0040406c
mov eax, 0x42abe0
call fcn.0040406c
mov eax, 0x42abe4
call fcn.0040406c
xor eax, eax
mov dword [0x42abd0], eax
xor eax, eax
mov dword [0x42abd4], eax
mov eax, 0x42ab30
mov edx, 0x40e3dc
call fcn.004040c0
xor eax, eax
mov dword [0x42abd8], eax
xor eax, eax
mov dword [0x42abcc], eax
mov eax, 0x42abe8
mov edx, 0x12
call fcn.00404638
mov eax, 0x42abec
mov edx, 0x20
call fcn.00404638
mov eax, 0x42abf0
mov edx, 0x1a
call fcn.00404638
mov eax, 0x42abf4
mov edx, 0x2f
call fcn.00404638
mov eax, 0x42abf8
mov edx, 0x12
call fcn.00404638
mov eax, 0x42ab30
mov edx, 0x40e4b0
call fcn.004040c0
mov eax, 0x42abfc
mov edx, 0x20
call fcn.00404638
mov eax, dword [edi]
mov byte [eax], 0
jmp 0x40e0f6
cmp dword [0x42abb0], 0x32
jb 0x40e122
cmp dword [0x42abb0], 0x100000
jae 0x40d6cf
mov eax, dword [edi]
mov edx, dword [0x42abb0]
mov byte [eax + edx + 1], 0
mov byte [0x42ac88], 0
mov byte [0x42ac89], 0
mov byte [0x42ac8a], 0
mov esi, dword [0x42abb0]
test esi, esi
jbe 0x40e0eb
mov ebx, 1
cmp byte [0x42ac8a], 0
jne 0x40d717
mov eax, dword [edi]
cmp byte [eax + ebx], 8
jne 0x40d8dd
inc byte [0x42ac8a]
jmp 0x40d8dd
cmp byte [0x42ac8a], 1
jne 0x40d75e
mov eax, dword [edi]
mov al, byte [eax + ebx]
mov edx, eax
and dl, 0xf
cmp dl, 9
jne 0x40d752
and eax, 0xff
shr eax, 4
cmp eax, 0xff
ja 0x40d745
bt dword [0x4291e0], eax
jae 0x40d752
inc byte [0x42ac8a]
jmp 0x40d8dd
mov byte [0x42ac8a], 0
jmp 0x40d8dd
cmp byte [0x42ac8a], 1
jbe 0x40d79e
cmp byte [0x42ac8a], 9
jae 0x40d79e
mov eax, dword [edi]
mov al, byte [eax + ebx]
xor edx, edx
mov dl, al
shr edx, 4
cmp edx, 0xa
jae 0x40d792
and al, 0xf
cmp al, 0xa
jae 0x40d792
inc byte [0x42ac8a]
jmp 0x40d8dd
mov byte [0x42ac8a], 0
jmp 0x40d8dd
mov al, byte [0x42ac8a]
add al, 0xf7
sub al, 7
jae 0x40d7c8
mov eax, dword [edi]
cmp byte [eax + ebx], 0
jne 0x40d7bc
inc byte [0x42ac8a]
jmp 0x40d8dd
mov byte [0x42ac8a], 0
jmp 0x40d8dd
cmp byte [0x42ac8a], 0x10
jne 0x40d8dd
mov eax, 0x42ab30
mov edx, 0x40e55c
call fcn.004040c0
mov eax, dword [0x42abf8]
call fcn.00404508
mov edx, eax
xor eax, eax
mov al, byte [0x42ac8a]
mov ecx, ebx
sub ecx, eax
mov eax, dword [edi]
add eax, ecx
mov ecx, 9
call fcn.00407a9c
mov eax, dword [0x42abf8]
call fcn.00407a38
test al, al
je 0x40d8d6
mov eax, dword [0x42abfc]
call fcn.00404508
mov edx, eax
mov eax, dword [edi]
add eax, ebx
mov ecx, 0x10
call fcn.00407a9c
mov eax, dword [0x42abfc]
call fcn.00407a38
test al, al
je 0x40d8d6
mov edx, dword [0x42abe4]
mov eax, dword [0x42abfc]
call fcn.004045f0
test eax, eax
jne 0x40d8d6
push dword [0x42abe4]
push 0x40e360
push 0x40e5ec
mov eax, dword [0x42abcc]
add eax, ebx
xor edx, edx
mov dl, byte [0x42ac8a]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x14]
call fcn.00406940
push dword [ebp - 0x14]
push 0x40e5fc
push dword [0x42abf8]
push 0x40e608
push 0x40e614
mov eax, dword [0x42abcc]
add eax, ebx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18]
call fcn.00406940
push dword [ebp - 0x18]
push 0x40e5fc
push dword [0x42abfc]
mov eax, 0x42abe4
mov edx, 0xb
call fcn.004043c8
inc dword [0x42abd8]
mov byte [0x42ac8a], 0
cmp byte [0x42ac88], 0
jne 0x40d8fd
mov eax, dword [edi]
cmp byte [eax + ebx], 0x30
jne 0x40dc84
inc byte [0x42ac88]
jmp 0x40dc84
cmp byte [0x42ac88], 1
jne 0x40d933
mov eax, dword [edi]
cmp byte [eax + ebx], 0x38
jne 0x40d920
inc byte [0x42ac88]
mov byte [0x42ac89], 2
jmp 0x40e0e3
mov byte [0x42ac88], 0
mov byte [0x42ac89], 0
jmp 0x40dc84
cmp byte [0x42ac88], 2
jne 0x40d97a
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x4291c0], eax
jae 0x40d96e
mov eax, dword [edi]
mov al, byte [eax + ebx - 3]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40d96e
inc byte [0x42ac88]
jmp 0x40dc84
mov byte [0x42ac88], 0
jmp 0x40dc84
cmp byte [0x42ac88], 3
jne 0x40d9a2
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x40d996
inc byte [0x42ac88]
jmp 0x40dc84
mov byte [0x42ac88], 0
jmp 0x40dc84
cmp byte [0x42ac88], 3
jbe 0x40d9de
cmp byte [0x42ac88], 0x11
jae 0x40d9de
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x429160], eax
jae 0x40d9d2
inc byte [0x42ac88]
jmp 0x40dc84
mov byte [0x42ac88], 0
jmp 0x40dc84
cmp byte [0x42ac88], 0x11
jne 0x40dc84
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x429160], eax
jae 0x40dc84
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40dc84
xor eax, eax
mov al, byte [0x42ac88]
mov edx, ebx
sub edx, eax
mov dword [0x42abb4], edx
mov byte [0x42ac88], 0
mov eax, 0x42abe8
call fcn.00404560
mov edx, dword [edi]
mov ecx, dword [0x42abb4]
add edx, ecx
mov ecx, 0x12
call fcn.0040610c
mov eax, dword [0x42abe8]
call fcn.00407a38
test al, al
je 0x40dc84
push dword [0x42abdc]
push 0x40e360
push 0x40e624
mov eax, dword [0x42abcc]
add eax, dword [0x42abb4]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1c]
call fcn.00406940
push dword [ebp - 0x1c]
push 0x40e5fc
push dword [0x42abe8]
mov eax, 0x42abdc
mov edx, 6
call fcn.004043c8
cmp dword [0x42abb4], 0xc8
jbe 0x40dac3
mov eax, dword [0x42abb4]
sub eax, 0xc8
mov dword [0x42abbc], eax
jmp 0x40dacd
mov dword [0x42abbc], 1
mov eax, dword [0x42abb4]
add eax, 0xc8
mov dword [0x42abc4], eax
mov eax, dword [0x42abc4]
add eax, 0x20
cmp eax, dword [0x42abb0]
jbe 0x40daf6
mov eax, dword [0x42abb0]
mov dword [0x42abc4], eax
mov eax, dword [0x42abbc]
cmp eax, dword [0x42abc4]
ja 0x40dc7d
mov eax, dword [0x42abbc]
cmp eax, dword [0x42abb4]
jbe 0x40db22
cmp ebx, dword [0x42abbc]
jbe 0x40db22
mov dword [0x42abbc], ebx
cmp byte [0x42ac88], 0x1f
jae 0x40db5b
mov eax, dword [edi]
mov edx, dword [0x42abbc]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x429180], eax
jae 0x40db4f
inc byte [0x42ac88]
jmp 0x40dc66
mov byte [0x42ac88], 0
jmp 0x40dc66
cmp byte [0x42ac88], 0x1f
jne 0x40dc66
mov eax, dword [edi]
mov edx, dword [0x42abbc]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x429180], eax
jae 0x40dc5f
mov eax, dword [edi]
mov edx, dword [0x42abbc]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40dc5f
mov eax, dword [edi]
mov edx, dword [0x42abbc]
mov al, byte [eax + edx - 0x20]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40dc5f
mov eax, 0x42abec
call fcn.00404560
xor edx, edx
mov dl, byte [0x42ac88]
mov ecx, dword [0x42abbc]
sub ecx, edx
mov edx, dword [edi]
add edx, ecx
mov ecx, 0x20
call fcn.0040610c
mov eax, dword [0x42abec]
call fcn.00407a38
test al, al
je 0x40dc5f
mov edx, dword [0x42abdc]
mov eax, dword [0x42abec]
call fcn.004045f0
test eax, eax
jne 0x40dc5f
push dword [0x42abdc]
push 0x40e608
push 0x40e634
mov eax, dword [0x42abcc]
add eax, dword [0x42abbc]
xor edx, edx
mov dl, byte [0x42ac88]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x20]
call fcn.00406940
push dword [ebp - 0x20]
push 0x40e5fc
push dword [0x42abec]
mov eax, 0x42abdc
mov edx, 6
call fcn.004043c8
inc dword [0x42abd0]
mov byte [0x42ac88], 0
inc dword [0x42abbc]
mov eax, dword [0x42abbc]
cmp eax, dword [0x42abc4]
jbe 0x40db07
mov byte [0x42ac88], 0
cmp byte [0x42ac89], 1
jbe 0x40e0e3
cmp byte [0x42ac89], 2
jne 0x40dcb9
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40dcad
inc byte [0x42ac89]
jmp 0x40e0e3
mov byte [0x42ac89], 0
jmp 0x40e0e3
cmp byte [0x42ac89], 3
jne 0x40dcec
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x4291c0], eax
jae 0x40dce0
inc byte [0x42ac89]
jmp 0x40e0e3
mov byte [0x42ac89], 0
jmp 0x40e0e3
cmp byte [0x42ac89], 4
jne 0x40dd14
mov eax, dword [edi]
cmp byte [eax + ebx], 0x39
jne 0x40dd08
inc byte [0x42ac89]
jmp 0x40e0e3
mov byte [0x42ac89], 0
jmp 0x40e0e3
mov al, byte [0x42ac89]
cmp al, 0x1f
ja 0x40dd27
and eax, 0x7f
bt dword [0x40e638], eax
jae 0x40dd48
mov eax, dword [edi]
cmp byte [eax + ebx], 0x20
jne 0x40dd3c
inc byte [0x42ac89]
jmp 0x40e0e3
mov byte [0x42ac89], 0
jmp 0x40e0e3
mov al, byte [0x42ac89]
cmp al, 0x1f
ja 0x40dd5b
and eax, 0x7f
bt dword [0x40e63c], eax
jae 0x40dd87
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x429160], eax
jae 0x40dd7b
inc byte [0x42ac89]
jmp 0x40e0e3
mov byte [0x42ac89], 0
jmp 0x40e0e3
cmp byte [0x42ac89], 0x19
jne 0x40e0e3
mov eax, dword [edi]
mov al, byte [eax + ebx]
and eax, 0xff
bt dword [0x429160], eax
jae 0x40e0e3
mov eax, dword [edi]
mov al, byte [eax + ebx + 1]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40e0e3
mov eax, dword [edi]
mov al, byte [eax + ebx - 0x1a]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40e0e3
xor eax, eax
mov al, byte [0x42ac89]
mov edx, ebx
sub edx, eax
mov dword [0x42abb8], edx
mov byte [0x42ac89], 0
mov eax, dword [edi]
mov edx, dword [0x42abb8]
lea edx, [eax + edx]
mov eax, 0x42abf0
mov ecx, 0x1a
call fcn.0040415c
lea edx, [ebp - 0x24]
mov eax, dword [0x42abf0]
call fcn.004079b0
mov edx, dword [ebp - 0x24]
mov eax, 0x42abf0
call fcn.004040c0
mov eax, dword [0x42abf0]
call fcn.00407a38
test al, al
je 0x40e0e3
push dword [0x42abe0]
push 0x40e360
push 0x40e648
mov eax, dword [0x42abcc]
add eax, dword [0x42abb8]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x28]
call fcn.00406940
push dword [ebp - 0x28]
push 0x40e5fc
push dword [0x42abf0]
mov eax, 0x42abe0
mov edx, 6
call fcn.004043c8
cmp dword [0x42abb8], 0xc8
jbe 0x40de9a
mov eax, dword [0x42abb8]
sub eax, 0xc8
mov dword [0x42abc0], eax
jmp 0x40dea4
mov dword [0x42abc0], 1
mov eax, dword [0x42abb8]
add eax, 0xc8
mov dword [0x42abc8], eax
mov eax, dword [0x42abc8]
add eax, 0x2f
cmp eax, dword [0x42abb0]
jbe 0x40decd
mov eax, dword [0x42abb0]
mov dword [0x42abc8], eax
mov eax, dword [0x42abc0]
cmp eax, dword [0x42abc8]
ja 0x40e0dc
mov eax, 0x42ab30
mov edx, 0x40e658
call fcn.004040c0
mov eax, dword [0x42abc0]
cmp eax, dword [0x42abb8]
jbe 0x40df08
cmp ebx, dword [0x42abc0]
jbe 0x40df08
mov dword [0x42abc0], ebx
mov al, byte [0x42ac89]
cmp al, 0x2f
ja 0x40df1b
and eax, 0x7f
bt dword [0x40e6b0], eax
jae 0x40df4d
mov eax, dword [edi]
mov edx, dword [0x42abc0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x429180], eax
jae 0x40df41
inc byte [0x42ac89]
jmp 0x40e0b6
mov byte [0x42ac89], 0
jmp 0x40e0b6
mov al, byte [0x42ac89]
cmp al, 0x2f
ja 0x40df60
and eax, 0x7f
bt dword [0x40e6b8], eax
jae 0x40df87
mov eax, dword [edi]
mov edx, dword [0x42abc0]
cmp byte [eax + edx], 0x20
jne 0x40df7b
inc byte [0x42ac89]
jmp 0x40e0b6
mov byte [0x42ac89], 0
jmp 0x40e0b6
cmp byte [0x42ac89], 0x2e
jne 0x40e0b6
mov eax, 0x42ab30
mov edx, 0x40e6c8
call fcn.004040c0
mov eax, dword [edi]
mov edx, dword [0x42abc0]
mov al, byte [eax + edx]
and eax, 0xff
bt dword [0x429180], eax
jae 0x40e0af
mov eax, dword [edi]
mov edx, dword [0x42abc0]
mov al, byte [eax + edx + 1]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40e0af
mov eax, dword [edi]
mov edx, dword [0x42abc0]
mov al, byte [eax + edx - 0x2f]
and eax, 0xff
bt dword [0x4291a0], eax
jae 0x40e0af
xor eax, eax
mov al, byte [0x42ac89]
mov edx, dword [0x42abc0]
sub edx, eax
mov eax, dword [edi]
lea edx, [eax + edx]
mov eax, 0x42abf4
mov ecx, 0x2f
call fcn.0040415c
lea edx, [ebp - 0x2c]
mov eax, dword [0x42abf4]
call fcn.004079b0
mov edx, dword [ebp - 0x2c]
mov eax, 0x42abf4
call fcn.004040c0
mov eax, dword [0x42abf4]
call fcn.00407a38
test al, al
je 0x40e0af
mov edx, dword [0x42abe0]
mov eax, dword [0x42abf4]
call fcn.004045f0
test eax, eax
jne 0x40e0af
push dword [0x42abe0]
push 0x40e608
push 0x40e6e4
mov eax, dword [0x42abcc]
add eax, dword [0x42abc0]
xor edx, edx
mov dl, byte [0x42ac89]
sub eax, edx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x30]
call fcn.00406940
push dword [ebp - 0x30]
push 0x40e5fc
push dword [0x42abf4]
mov eax, 0x42abe0
mov edx, 6
call fcn.004043c8
inc dword [0x42abd4]
mov byte [0x42ac89], 0
inc dword [0x42abc0]
mov eax, 0x42ab30
mov edx, 0x40e6f4
call fcn.004040c0
mov eax, dword [0x42abc0]
cmp eax, dword [0x42abc8]
jbe 0x40dede
mov byte [0x42ac89], 0
inc ebx
dec esi
jne 0x40d6f7
mov eax, dword [0x42abb0]
add dword [0x42abcc], eax
push 0
push 0x42abb0
push 0x100000
mov eax, dword [edi]
inc eax
push eax
mov eax, dword [0x42abac]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x40e122
cmp dword [0x42abb0], 0
ja 0x40d6a9
cmp dword [0x42abd0], 0
jbe 0x40e148
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x42abdc]
push 0x40e360
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.004043c8
cmp dword [0x42abd4], 0
jbe 0x40e16e
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x42abe0]
push 0x40e360
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.004043c8
cmp dword [0x42abd8], 0
jbe 0x40e194
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x42abe4]
push 0x40e360
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.004043c8
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.00404308
cmp eax, 0xed800
jle 0x40e1ba
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov ecx, 0xed800
xor edx, edx
call fcn.00404568
mov eax, dword [0x42abac]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0x42ab30
mov edx, 0x40e784
call fcn.004040c0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e1fe
lea eax, [ebp - 0x30]
mov edx, 0xa
call fcn.00404090
lea eax, [ebp - 4]
call fcn.0040406c
ret