Function at 0x10008217
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x7b4]
sub esp, 0x834
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp + 0x7b0], eax
mov eax, dword [ebp + 0x7bc]
push esi
xor esi, esi
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x7c4]
push 0x8101
push eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x7c], esi
call dword [sym.imp.MSVCR90.dll__open]
mov dword [ebp - 0x68], eax
or eax, 0xffffffff
pop ecx
pop ecx
cmp dword [ebp - 0x68], eax
je 0x10008442
cmp dword [ebp + 0x7c0], esi
mov dword [ebp - 0x60], esi
jle 0x10008435
mov esi, dword [sym.imp.MSVCR90.dll__lseek]
push edi
mov edi, dword [sym.imp.MSVCR90.dll__read]
push ebx
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x60]
push 0x8000
push dword [eax + ecx*4]
call dword [sym.imp.MSVCR90.dll__open]
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffffff
je 0x100083e7
and dword [ebp - 0x54], 0
and dword [ebp - 0x6c], 0
push 4
lea eax, [ebp - 0x6c]
push eax
push ebx
call edi
push 4
lea eax, [ebp - 0x54]
push eax
push ebx
call edi
mov eax, 0x45564157
add esp, 0x18
cmp dword [ebp - 0x54], eax
jne 0x100082ea
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x6c], 0x46464952
jmp 0x10008310
push 4
lea eax, [ebp - 0x64]
push eax
push ebx
call edi
add esp, 0xc
cmp dword [ebp - 0x6c], 0x46464952
jne 0x10008395
cmp dword [ebp - 0x64], 0x45564157
jne 0x10008395
push 4
lea eax, [ebp - 0x64]
push eax
push ebx
call edi
push 4
lea eax, [ebp - 0x54]
push eax
push ebx
call edi
add esp, 0x18
jmp 0x1000834d
cmp dword [ebp - 0x64], 0x61746164
push 1
je 0x10008354
push dword [ebp - 0x54]
push ebx
call esi
push 4
lea eax, [ebp - 0x64]
push eax
push ebx
call edi
push 4
lea eax, [ebp - 0x54]
push eax
push ebx
call edi
add esp, 0x24
cmp eax, 4
je 0x10008327
jmp 0x10008395
mov eax, dword [ebp - 0x54]
add dword [ebp - 0x58], eax
xor eax, eax
push eax
push ebx
cmp dword [ebp - 0x60], eax
jne 0x10008387
mov dword [ebp - 0x70], eax
call esi
add eax, dword [ebp - 0x54]
push 1
push 0
push ebx
mov dword [ebp - 0x5c], eax
call esi
add esp, 0x18
sub eax, 4
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x74], 1
jmp 0x10008395
call esi
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x54]
add esp, 0xc
mov dword [ebp - 0x5c], eax
push 0
push dword [ebp - 0x70]
push ebx
call esi
add esp, 0xc
mov eax, 0x800
cmp dword [ebp - 0x5c], eax
jg 0x100083ad
mov eax, dword [ebp - 0x5c]
push eax
lea eax, [ebp - 0x50]
push eax
push ebx
call edi
add esp, 0xc
mov dword [ebp - 0x78], eax
test eax, eax
jle 0x100083d6
push eax
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.MSVCR90.dll__write]
mov eax, dword [ebp - 0x78]
add esp, 0xc
sub dword [ebp - 0x5c], eax
cmp dword [ebp - 0x78], 0x800
je 0x100083a0
push ebx
call dword [sym.imp.MSVCR90.dll__close]
pop ecx
inc dword [ebp - 0x60]
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp + 0x7c0]
jl 0x10008290
cmp dword [ebp - 0x74], 0
je 0x10008433
mov ebx, dword [ebp - 0x68]
push 0
push dword [ebp - 0x7c]
push ebx
call esi
mov edi, dword [sym.imp.MSVCR90.dll__write]
push 4
lea eax, [ebp - 0x58]
push eax
push ebx
call edi
push 0
push 4
push ebx
call esi
add dword [ebp - 0x58], 0xbc
push 4
lea eax, [ebp - 0x58]
push eax
push ebx
call edi
add esp, 0x30
pop ebx
pop edi
push dword [ebp - 0x68]
call dword [sym.imp.MSVCR90.dll__close]
xor eax, eax
pop ecx
inc eax
mov ecx, dword [ebp + 0x7b0]
xor ecx, ebp
pop esi
call fcn.1007b2de
add ebp, 0x7b4
leave
ret