Function at 0x6631b8
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xf
push 0
push 0
dec ecx
jne 0x6631c0
push ecx
push ebx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00407578
mov eax, dword [ebp - 8]
call fcn.00407578
xor eax, eax
push ebp
push 0x663670
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.004078bc
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0041d588
test al, al
jne 0x663211
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.004078bc
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0041d588
test al, al
je 0x6635fc
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0xc]
call fcn.004082fc
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x6635fc
mov eax, 0x800
call fcn.00634fac
mov dword [ebp - 0x24], eax
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_GetFileSize
cmp eax, 0x2000
jle 0x663296
push 0
push 0
push 0x2000
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
push 2
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
push 0
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
push 0x800
mov eax, dword [0x688b50]
add eax, 0x28
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, 0x800
call fcn.004053b0
push 0
lea eax, [ebp - 0x20]
push eax
push 0x800
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0x10]
mov edx, 0x663688
call fcn.00407958
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, dword [ebp - 0x24]
call fcn.00636874
lea eax, [ebp - 0x10]
mov edx, 0x6636a0
call fcn.00407958
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, dword [ebp - 0x24]
call fcn.00636874
mov eax, dword [ebp - 0x24]
mov byte [eax + 0x12c], 0
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x24]
add edx, 0xc8
mov ecx, 0
call fcn.00407bd4
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
call fcn.004083d4
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x28]
call fcn.0062e02c
mov edx, dword [ebp - 0x28]
mov eax, dword [0x688b50]
add eax, 0x1c
call fcn.00407874
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x1c]
call fcn.0062c0f4
mov edx, dword [0x688b50]
mov dword [edx + 0x20], eax
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x663394
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x19
jle 0x6633fa
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov ecx, 0
call fcn.00407bd4
xor eax, eax
push ebp
push 0x6633d8
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0040b544
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x6633df
lea eax, [ebp - 0x14]
call fcn.004074b8
ret
push 0
lea eax, [ebp - 0x20]
push eax
push 0x800
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov edx, dword [0x688b50]
mov byte [edx + 0x838], al
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x1c]
call fcn.0062c184
mov ebx, eax
mov eax, dword [0x688b50]
mov byte [eax + 0x838], bl
mov eax, dword [0x688b50]
cmp byte [eax + 0x840], 0
je 0x6634b0
lea eax, [ebp - 0x38]
push eax
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0x11
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0x11
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0
movzx eax, bl
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x44], 0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x3c], 0
lea edx, [ebp - 0x60]
mov ecx, 4
mov eax, 0x6636b8
call fcn.0041e194
mov eax, dword [ebp - 0x38]
xor edx, edx
call fcn.0064d668
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle_1
push 0x7fffffff
push 0xfecd9826
lea eax, [ebp - 0x64]
call fcn.00635f40
mov eax, dword [ebp - 0x64]
lea edx, [ebp - 0x10]
call fcn.0040b388
push 0
mov eax, dword [0x688b50]
add eax, 0x28
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
call fcn.00636874
push 0
lea edx, [ebp - 0x68]
mov eax, dword [0x688b50]
mov eax, dword [eax + 0x24]
call fcn.00638750
mov ecx, dword [ebp - 0x68]
mov eax, dword [0x688b50]
add eax, 0x28
mov edx, 0x800
call fcn.00636874
push 0
lea edx, [ebp - 0x70]
mov eax, dword [0x688b50]
movzx eax, byte [eax + 0x838]
call fcn.0041cde0
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
mov ecx, 0
call fcn.00408018
mov ecx, dword [ebp - 0x6c]
mov eax, dword [0x688b50]
add eax, 0x28
mov edx, 0x800
call fcn.00636874
mov eax, dword [0x688b50]
add eax, 0x28
mov ecx, 0x663734
mov edx, 0x800
call fcn.00636a2c
mov edx, dword [0x688b50]
mov edx, dword [edx + 0x1c]
mov eax, edx
test eax, eax
je 0x66357a
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x1d
jge 0x663583
mov al, 1
jmp 0x663594
mov eax, edx
test eax, eax
je 0x66358e
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x23
setg al
test al, al
je 0x6635f4
mov eax, dword [0x688b50]
add eax, 0x18
call fcn.00407494
mov eax, dword [0x688b50]
add eax, 0x1c
call fcn.00407494
mov eax, dword [0x688b50]
xor ebx, ebx
mov byte [eax + 0x838], bl
mov eax, dword [0x688b50]
cmp byte [eax + 0x840], 0
je 0x6635f4
lea eax, [ebp - 0x74]
push eax
movzx eax, bl
mov dword [ebp - 0x7c], eax
mov byte [ebp - 0x78], 0
lea edx, [ebp - 0x7c]
xor ecx, ecx
mov eax, 0x663760
call fcn.0041e194
mov eax, dword [ebp - 0x74]
xor edx, edx
call fcn.0064d668
mov eax, dword [ebp - 0x24]
call fcn.00404d74
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x663677
lea eax, [ebp - 0x74]
mov edx, 2
call fcn.004074f4
lea eax, [ebp - 0x6c]
mov edx, 2
call fcn.00407524
lea eax, [ebp - 0x64]
call fcn.00407494
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004074f4
lea eax, [ebp - 0x30]
call fcn.004074b8
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004074f4
lea eax, [ebp - 0x18]
call fcn.00407494
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00407524
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004074f4
ret