Function at 0x40825a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push esi
push edi
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, dword [0x4169fe]
inc dword [0x416992]
mov dword [ebp - 8], eax
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.00411140
cmp eax, 3
jne 0x40829b
mov dword [ebp - 4], eax
jmp 0x4085d9
cmp byte [0x416910], 2
je 0x4082d6
mov eax, dword [esi + 0x18]
mov ebx, dword [esi + 0x14]
cmp eax, dword [edi + 0x18]
jb 0x408603
ja 0x408660
mov ecx, 0x1312cff
sub ebx, dword [edi + 0x14]
je 0x4082d6
jb 0x4082ce
cmp ebx, ecx
jbe 0x4082d6
jmp 0x408660
add ebx, ecx
jae 0x408603
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
cmp ecx, dword [edi + 0x20]
jne 0x408660
cmp edx, dword [edi + 0x1c]
jne 0x408660
cmp byte [0x416910], 0
je 0x40868c
mov eax, 0xa
xchg ecx, eax
shr edx, 1
rcr eax, 1
loop 0x408301
test eax, eax
jne 0x40830c
inc eax
test edx, edx
je 0x408315
mov eax, 0xffffffff
push eax
push 0x187
call fcn.0040d931
mov byte [0x4161d1], 0xd9
push 4
push 0x1000
push dword [0x4161db]
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [ebp - 4], eax
test eax, eax
je 0x4085d9
mov dword [ebp - 0xc], eax
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push 0x8000000
push 0
push 0
push 0x80000000
lea eax, [ebp - 0x10]
push eax
push dword [0x4169fa]
call fcn.00406754
mov dword [ebp - 4], eax
cmp eax, 4
jne 0x4085f2
push 0x8000000
push 0
push 0
push 0x80000000
lea eax, [ebp - 0x14]
push eax
push dword [0x4169fe]
call fcn.00406754
mov dword [ebp - 4], eax
cmp eax, 4
jne 0x4085ea
mov ebx, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
xor edx, edx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edx
mov eax, dword [0x4161df]
xor edx, edx
sub dword [ebp - 0x28], eax
jae 0x4083dd
sbb dword [ebp - 0x24], edx
jae 0x4083dd
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
test eax, eax
je 0x408512
mov dword [ebp - 0x20], eax
add dword [ebp - 0x30], eax
adc dword [ebp - 0x2c], 0
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x408407
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
je 0x408446
push 0
push dword [0x4169fa]
push 0x215
push 0x202
push 0x1a0
call fcn.004098f6
mov esi, eax
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
cmp esi, 1
je 0x408355
mov dword [ebp - 4], esi
jmp 0x4085f2
mov edi, dword [ebp - 0xc]
add edi, dword [0x4161df]
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push edi
push dword [ebp - 0x14]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x40846d
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
je 0x4084ac
push 0
push dword [0x4169fe]
push 0x215
push 0x202
push 0x1a0
call fcn.004098f6
mov esi, eax
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
cmp esi, 1
je 0x408355
mov dword [ebp - 4], esi
jmp 0x4085f2
mov esi, dword [ebp - 0xc]
pushfd
cld
mov ecx, eax
and ecx, 0xfffffffc
je 0x4084c9
shr ecx, 2
repe cmpsd dword [esi], dword es:[edi]
je 0x4084c9
inc ecx
sub esi, 4
sub edi, 4
shl ecx, 2
popfd
and eax, 3
add ecx, eax
je 0x4083bb
pushfd
cld
repe cmpsb byte [esi], byte es:[edi]
setne al
popfd
test al, al
je 0x4083bb
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CloseHandle
inc dword [0x41697a]
test word [0x416928], 1
je 0x408527
push 1
push dword [0x4169fe]
push 0x1f3
call fcn.00407f67
jmp 0x408527
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push 1
lea eax, [edi + 0x14]
push eax
lea eax, [esi + 0x14]
push eax
call fcn.0040ffb8
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
mov byte [0x4161d1], 0xdd
push 0x8000
push 0
push dword [ebp - 0xc]
call sub.KERNEL32.dll_VirtualFree
mov dword [ebp - 4], eax
test eax, eax
je 0x4085d9
cmp byte [0x416913], 0
je 0x40858f
test word [0x416928], 0x800
je 0x40858f
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, dword [esi]
mov ebx, dword [edi]
and eax, 7
and ebx, 7
cmp eax, ebx
je 0x40858f
push 1
push dword [ebp - 8]
push 0x1f1
call fcn.00407f67
cmp byte [0x4161fb], 0
je 0x4085d2
test word [0x416928], 0x800
je 0x4085d2
push 0x21b
push 0x208
push 0
push 0x1aa
call fcn.0040fe51
mov dword [ebp - 4], eax
test eax, eax
jne 0x4085d9
push 1
push dword [0x4169fe]
push 0x1f2
call fcn.00407f67
mov dword [ebp - 4], 4
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
push 0x8000
push 0
push dword [ebp - 0xc]
call sub.KERNEL32.dll_VirtualFree
jmp 0x4085d9
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
test word [0x416928], 0x20
je 0x408626
push 1
push dword [0x4169fe]
push 0x1ef
call fcn.00407f67
cmp byte [0x416917], 0
je 0x408660
cmp byte [0x416917], 2
jne 0x40868c
inc dword [0x41695e]
test word [0x416928], 0x40
je 0x4085d2
push 1
push dword [0x4169fa]
push 0x1f3
call fcn.00407f67
jmp 0x4085d2
inc dword [0x41697a]
test word [0x416928], 1
je 0x4085d2
push 1
push dword [0x4169fe]
push 0x1f3
call fcn.00407f67
jmp 0x4085d2
test word [0x416928], 2
je 0x408558
push 1
push dword [0x4169fe]
push 0x1ee
call fcn.00407f67
jmp 0x408558