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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x47aed6
push eax
mov eax, 0x8054
mov dword fs:[0], esp
call fcn.00445480
push ebx
push ebp
push esi
or eax, 0xffffffff
push edi
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x806c], ebp
mov dword [esp + 0x24], eax
push 0x38
lea eax, [esp + 0x30]
push str.1.2.3
push eax
mov byte [esp + 0x8078], 1
mov dword [esp + 0x28], ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ebp
call fcn.0046d3f0
add esp, 0xc
cmp eax, ebp
jne 0x46b292
mov ecx, dword [esp + 0x8074]
push ebp
push 0x80
push 3
push ebp
push ebp
push SysReAllocStringLen
call fcn.0040305e
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
je 0x46b0b6
mov ecx, dword [esp + 0x8078]
push ebp
push 0x80
push 2
push ebp
push 3
push 0x40000000
mov dword [esp + 0x38], ebx
call fcn.0040305e
push eax
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x46b0c1
mov dword [esp + 0x24], eax
jmp 0x46b0dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x46b292
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebp
je 0x46b0d5
push ebx
call eax
mov eax, esi
jmp 0x46b292
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [esp + 0x30]
push ebp
push ecx
lea edx, [esp + 0x6c]
push 0x4000
push edx
shr eax, 0xe
push ebx
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46b1e5
mov ebx, dword [esp + 0x807c]
cmp dword [esp + 0x30], ebp
je 0x46b216
lea eax, [esp + 0x64]
mov dword [esp + 0x2c], eax
lea edx, [esp + 0x2c]
mov esi, 0x4000
lea ecx, [esp + 0x4064]
push ebp
push edx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ecx
call fcn.0046d410
mov edi, eax
add esp, 8
cmp edi, 2
je 0x46b262
cmp edi, 0xfffffffb
jbe 0x46b15e
cmp edi, 0xfffffffd
jbe 0x46b267
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
sub esi, eax
lea eax, [esp + 0x18]
push ebp
push eax
lea ecx, [esp + 0x406c]
push esi
push ecx
push edx
mov dword [esp + 0x2c], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebp
je 0x46b231
cmp dword [esp + 0x18], esi
jne 0x46b22d
cmp ebx, ebp
je 0x46b1af
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebx]
mov eax, ecx
inc ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x28]
push ecx
push eax
mov ecx, ebx
call dword [edx]
cmp dword [esp + 0x3c], ebp
je 0x46b123
cmp edi, 1
je 0x46b216
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x30]
push ebp
push edx
lea eax, [esp + 0x6c]
push 0x4000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46b111
mov ebx, dword [esp + 0x10]
lea edx, [esp + 0x2c]
push edx
call fcn.0046ec60
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
cmp esi, ebp
je 0x46b290
mov eax, dword [esp + 0x14]
push eax
call esi
cmp esi, ebp
je 0x46b290
push ebx
jmp 0x46b28e
lea ecx, [esp + 0x2c]
push ecx
call fcn.0046ec60
add esp, 4
dec edi
neg edi
sbb edi, edi
and edi, 0xfffffffd
jmp 0x46b24b
cmp eax, ebp
jne 0x46b23b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x46b23e
or edi, 0xffffffff
lea ecx, [esp + 0x2c]
push ecx
call fcn.0046ec60
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebp
je 0x46b290
mov edx, dword [esp + 0x14]
push edx
call esi
cmp esi, ebp
je 0x46b290
jmp 0x46b289
mov edi, 0xfffffffd
lea ecx, [esp + 0x2c]
push ecx
call fcn.0046ec60
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
cmp esi, ebp
je 0x46b290
mov edx, dword [esp + 0x14]
push edx
call esi
cmp esi, ebp
je 0x46b290
mov eax, dword [esp + 0x10]
push eax
call esi
mov eax, edi
mov ecx, dword [esp + 0x8064]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x8060
ret 0xc