Function at 0x408d64
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 7
push 0
push 0
dec ecx
jne 0x408d6c
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a94
xor eax, eax
push ebp
push 0x409fbf
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00408418
mov eax, dword [ebp - 8]
call fcn.0040372c
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, 0x41eb54
mov edx, 0x409fd4
call fcn.00403780
mov eax, dword [ebp - 4]
call fcn.004038a4
cmp eax, 0x7f
jge 0x408de9
push 0
push 0x41ec20
mov eax, dword [ebp - 4]
call fcn.00403aa4
push eax
call sub.kernel32.dll_OpenFile
mov dword [0x41ebcc], eax
cmp dword [0x41ebcc], 0xffffffff
jne 0x408e1e
mov dword [ebp - 0xc], 1
jmp 0x408e1e
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.00403aa4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [0x41ebcc], eax
cmp dword [0x41ebcc], 0xffffffff
jne 0x408e1e
mov dword [ebp - 0xc], 2
mov eax, 0x41eb54
mov edx, 0x40a02c
call fcn.00403780
cmp dword [ebp - 0xc], 0
jbe 0x408ea6
mov eax, 0x41eb54
mov edx, 0x40a0bc
call fcn.00403780
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, 0xcf
ja 0x408e5b
bt dword [0x40a118], eax
jb 0x408e96
cmp dword [ebp - 0xc], 0x4cf
je 0x408e96
push 0x40a13c
push dword [ebp - 4]
push 0x40a14c
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0xc]
call fcn.00406434
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0x14]
call fcn.00412f04
mov eax, dword [0x41ebcc]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x409f9c
mov eax, 0x41eb54
mov edx, 0x40a158
call fcn.00403780
mov eax, 0x41ebfc
call fcn.0040372c
mov eax, 0x41ec00
call fcn.0040372c
mov eax, 0x41ec04
call fcn.0040372c
xor eax, eax
mov dword [0x41ebf0], eax
xor eax, eax
mov dword [0x41ebf4], eax
mov eax, 0x41eb54
mov edx, 0x40a1f0
call fcn.00403780
xor eax, eax
mov dword [0x41ebf8], eax
xor eax, eax
mov dword [0x41ebec], eax
mov eax, 0x41ec08
mov edx, 0x12
call fcn.00403b84
mov eax, 0x41ec0c
mov edx, 0x20
call fcn.00403b84
mov eax, 0x41ec10
mov edx, 0x1a
call fcn.00403b84
mov eax, 0x41ec14
mov edx, 0x2f
call fcn.00403b84
mov eax, 0x41ec18
mov edx, 0x12
call fcn.00403b84
mov eax, 0x41eb54
mov edx, 0x40a294
call fcn.00403780
mov eax, 0x41ec1c
mov edx, 0x20
call fcn.00403b84
xor eax, eax
mov edx, dword [0x41ecac]
test edx, edx
je 0x408f78
cmp eax, dword [edx - 4]
jb 0x408f7d
call fcn.00402f14
mov byte [edx + eax], 0
jmp 0x409e96
push 0
push 0x41ebd0
push 0x100000
mov eax, 1
mov edx, dword [0x41ecac]
test edx, edx
je 0x409eb6
cmp eax, dword [edx - 4]
jb 0x409ebb
call fcn.00402f14
lea eax, [edx + eax]
push eax
mov eax, dword [0x41ebcc]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x409edb
cmp dword [0x41ebd0], 0
ja 0x408f86
cmp dword [0x41ebf0], 0
jbe 0x409f01
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41ebfc]
push 0x40a14c
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.00403964
cmp dword [0x41ebf4], 0
jbe 0x409f27
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41ec00]
push 0x40a14c
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.00403964
cmp dword [0x41ebf8], 0
jbe 0x409f4d
mov eax, dword [ebp - 8]
push dword [eax]
push dword [0x41ec04]
push 0x40a14c
mov eax, dword [ebp - 8]
mov edx, 3
call fcn.00403964
mov eax, 0x41eb54
mov edx, 0x40a5c0
call fcn.00403780
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.004038a4
cmp eax, 0xed800
jle 0x409f82
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov ecx, 0xed800
xor edx, edx
call fcn.00403afc
mov eax, dword [0x41ebcc]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0x41eb54
mov edx, 0x40a620
call fcn.00403780
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409fc6
lea eax, [ebp - 0x38]
mov edx, 0xa
call fcn.00403750
lea eax, [ebp - 4]
call fcn.0040372c
ret