Function at 0x46ee24
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 0x46f0db
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.00408ca8
test al, al
jne 0x46eea6
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 [0x473418]
cmp dword [eax], 0
jne 0x46f09a
mov eax, dword [0x4731b0]
push dword [eax]
push 0x46f0f4
mov eax, dword [0x4733b8]
push dword [eax]
push 0x46f114
push dword [ebp - 8]
push 0x46f128
mov eax, edi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xa4]
call fcn.0040888c
push dword [ebp - 0xa4]
lea eax, [ebp - 0x1c]
mov edx, 7
call fcn.00404568
mov eax, dword [0x473430]
cmp dword [eax], 1
jne 0x46ef85
mov eax, dword [0x4731b0]
push dword [eax]
push 0x46f140
mov eax, dword [0x4733b8]
push dword [eax]
push 0x46f114
push dword [ebp - 8]
push 0x46f128
mov eax, edi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xa8]
call fcn.0040888c
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 [0x473390]
mov eax, dword [eax]
call eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x21
jae 0x46efc5
push 0x3e8
call sub.kernel32.dll_Sleep_1
jmp 0x46eee5
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.00407064
cmp bl, 0x31
jne 0x46f077
mov eax, dword [0x47351c]
cmp dword [eax], 0
jne 0x46f004
mov eax, dword [0x47351c]
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 [0x473188]
mov eax, dword [eax]
call eax
lea edx, [ebp - 0x5d]
lea eax, [ebp - 0x9e]
mov ecx, 0x20
call fcn.004084e0
test eax, eax
je 0x46f05d
push 0x3e8
call sub.kernel32.dll_Sleep_1
jmp 0x46eee5
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 0x46eee5
lea edx, [ebp - 0x5d]
mov eax, 0x46f158
mov ecx, 0x20
call fcn.004084e0
test eax, eax
jne 0x46eee5
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 0x46f0e2
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