Function at 0x46f500
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7c0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x83c], ebx
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
call fcn.00404698
xor eax, eax
push ebp
push 0x46f805
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x28], eax
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 0x1c]
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
push 0
push ebx
call sub.kernel32.dll_GetFileSize
mov esi, eax
cmp edi, esi
jae 0x46f5b8
mov dword [ebp - 0x10], 0xffffffff
lea edi, [esi + 0x400]
push edi
call fcn.00405e44
pop ecx
mov dword [ebp - 0x28], eax
mov eax, edi
add eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
push eax
call fcn.00405e44
pop ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov edx, edi
call fcn.00402d48
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, dword [ebp - 0x30]
call fcn.00402d48
push 0
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x34]
push eax
push esi
mov eax, dword [ebp - 0x28]
push eax
push ebx
call sub.kernel32.dll_ReadFile
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
push esi
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [0x4755c8]
mov eax, dword [eax]
call eax
lea eax, [ebp - 0x1c]
mov ecx, 0x46f820
mov edx, dword [ebp - 0xc]
call fcn.004044f4
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x46f7a3
lea ecx, [ebp - 0x18]
mov eax, dword [0x4751f0]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x1c]
call fcn.004046a8
push eax
mov eax, dword [ebp - 0x18]
call fcn.004046a8
mov ebx, eax
mov eax, ebx
mov ecx, 0x21
pop edx
call fcn.004084f0
test eax, eax
jne 0x46f7a0
lea eax, [ebp - 0x834]
xor ecx, ecx
mov edx, 0x800
call fcn.00402d48
mov edx, ebx
add edx, 0x21
lea eax, [ebp - 0x834]
call fcn.00408f2c
lea eax, [ebp - 0x834]
call fcn.00408ef0
test eax, eax
jbe 0x46f6b3
dec eax
mov dl, byte [ebp + eax - 0x834]
cmp dl, 0x5c
je 0x46f6b3
cmp dl, 0x2f
je 0x46f6b3
mov byte [ebp + eax - 0x834], 0
test eax, eax
ja 0x46f695
lea eax, [ebp - 0x838]
lea edx, [ebp - 0x834]
mov ecx, 0x800
call fcn.00404458
mov ecx, dword [ebp - 0x838]
mov edx, dword [0x4755d8]
mov edx, dword [edx]
lea eax, [ebp - 0x20]
call fcn.004044f4
mov eax, dword [ebp - 0x20]
call fcn.0045c370
lea eax, [ebp - 0x834]
xor ecx, ecx
mov edx, 0x800
call fcn.00402d48
mov eax, dword [ebp - 0x18]
call fcn.004046a8
mov edx, eax
add edx, 0x21
lea eax, [ebp - 0x834]
call fcn.00408f2c
lea eax, [ebp - 0x83c]
lea edx, [ebp - 0x834]
mov ecx, 0x800
call fcn.00404458
mov ecx, dword [ebp - 0x83c]
mov edx, dword [0x4755d8]
mov edx, dword [edx]
lea eax, [ebp - 0x20]
call fcn.004044f4
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
mov eax, dword [ebp - 0x20]
call fcn.004046a8
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
push 0
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push ebx
call sub.kernel32.dll_CloseHandle
cmp dword [ebp - 8], 0
je 0x46f7a0
lea eax, [ebp - 0x840]
mov ecx, dword [ebp - 0x20]
mov edx, 0x46f82c
call fcn.004044f4
mov eax, dword [ebp - 0x840]
mov edx, dword [ebp - 4]
call fcn.0046f488
inc dword [ebp - 0x14]
mov eax, dword [0x4751f0]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, dword [ebp - 0x14]
jg 0x46f62a
cmp dword [ebp - 0x10], 0
je 0x46f7d2
mov eax, dword [ebp - 0x24]
push eax
call fcn.00405e54
pop ecx
mov eax, dword [ebp - 0x28]
push eax
call fcn.00405e54
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46f80c
lea eax, [ebp - 0x840]
mov edx, 3
call fcn.0040420c
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040420c
lea eax, [ebp - 0xc]
call fcn.004041e8
ret