Function at 0x46f130
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff58
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0x1c], ebx
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404698
mov eax, dword [ebp - 8]
call fcn.00404698
xor eax, eax
push ebp
push 0x46f3e7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp - 4]
call fcn.00408cb8
test al, al
jne 0x46f1b2
push 0
push 0x80
push 2
push 0
push 3
push 0x10000000
mov eax, dword [ebp - 4]
call fcn.004046a8
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
mov eax, dword [ebp - 4]
call fcn.004046a8
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetFileSize
mov edi, eax
push 2
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer
mov eax, dword [0x475418]
cmp dword [eax], 0
jne 0x46f3a6
mov eax, dword [0x4751b0]
push dword [eax]
push 0x46f400
mov eax, dword [0x4753b8]
push dword [eax]
push 0x46f420
push dword [ebp - 8]
push 0x46f434
mov eax, edi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xa4]
call fcn.0040889c
push dword [ebp - 0xa4]
lea eax, [ebp - 0x1c]
mov edx, 7
call fcn.00404568
mov eax, dword [0x475430]
cmp dword [eax], 1
jne 0x46f291
mov eax, dword [0x4751b0]
push dword [eax]
push 0x46f44c
mov eax, dword [0x4753b8]
push dword [eax]
push 0x46f420
push dword [ebp - 8]
push 0x46f434
mov eax, edi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xa8]
call fcn.0040889c
push dword [ebp - 0xa8]
lea eax, [ebp - 0x1c]
mov edx, 7
call fcn.00404568
push 1
push 0x3c
mov eax, dword [ebp + 0xc]
push eax
push esi
push 0
push 0
mov eax, dword [ebp - 0x1c]
call fcn.004044a8
push eax
mov eax, dword [ebp - 0x1c]
call fcn.004046a8
push eax
mov eax, dword [0x475390]
mov eax, dword [eax]
call eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x21
jae 0x46f2d1
push 0x3e8
call sub.kernel32.dll_Sleep_1
jmp 0x46f1f1
mov bl, byte [esi]
lea eax, [ebp - 0x5d]
xor ecx, ecx
mov edx, 0x40
call fcn.00402d48
lea edx, [esi + 1]
lea eax, [ebp - 0x5d]
mov ecx, 0x20
call fcn.00407074
cmp bl, 0x31
jne 0x46f383
mov eax, dword [0x47551c]
cmp dword [eax], 0
jne 0x46f310
mov eax, dword [0x47551c]
mov dword [eax], 0xffffffff
lea eax, [ebp - 0x9e]
xor ecx, ecx
mov edx, 0x40
call fcn.00402d48
mov eax, dword [ebp - 0x10]
sub eax, 0x21
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x9e]
push eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [esi + 0x21]
push eax
mov eax, dword [0x475188]
mov eax, dword [eax]
call eax
lea edx, [ebp - 0x5d]
lea eax, [ebp - 0x9e]
mov ecx, 0x20
call fcn.004084f0
test eax, eax
je 0x46f369
push 0x3e8
call sub.kernel32.dll_Sleep_1
jmp 0x46f1f1
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [esi + 0x21]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_WriteFile_1
add edi, dword [ebp - 0x14]
cmp bl, 0x32
jne 0x46f1f1
lea edx, [ebp - 0x5d]
mov eax, 0x46f464
mov ecx, 0x20
call fcn.004084f0
test eax, eax
jne 0x46f1f1
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp + 8]
mov dword [eax], edi
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46f3ee
lea eax, [ebp - 0xa8]
mov edx, 2
call fcn.0040420c
lea eax, [ebp - 0x1c]
call fcn.004041e8
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040420c
ret