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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x47d056
push eax
mov eax, 0x8050
mov dword fs:[0], esp
call fcn.004468d0
push ebx
push ebp
push esi
push edi
xor edi, edi
push 0x38
lea eax, [esp + 0x24]
push str.1.2.3
push eax
mov dword [esp + 0x8074], 1
mov dword [esp + 0x20], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], edi
call fcn.0046f860
add esp, 0xc
cmp eax, edi
jne 0x46d6fc
mov ecx, dword [esp + 0x8070]
mov eax, dword [ecx + 8]
cmp eax, edi
jne 0x46d4a7
mov eax, 0x47e608
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push 0x80
push 3
push edi
push edi
push SysReAllocStringLen
push eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
je 0x46d501
mov edx, dword [esp + 0x8074]
mov dword [esp + 0x58], ebx
mov eax, dword [edx + 8]
cmp eax, edi
jne 0x46d4e1
mov eax, 0x47e608
push edi
push 0x80
push 2
push edi
push 3
push 0x40000000
push eax
call esi
mov ebp, eax
cmp ebp, 0xffffffff
je 0x46d50c
mov dword [esp + 0x5c], ebp
jmp 0x46d527
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x46d6fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x46d520
push ebx
call eax
mov eax, esi
jmp 0x46d6fc
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
shr eax, 0xe
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x68]
push 0x4000
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46d639
mov ebx, dword [esp + 0x8078]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x46d66d
lea edx, [esp + 0x60]
mov dword [esp + 0x20], edx
lea ecx, [esp + 0x20]
mov esi, 0x4000
lea eax, [esp + 0x4060]
push 0
push ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], eax
call fcn.0046f880
mov edi, eax
add esp, 8
cmp edi, 2
je 0x46d6d0
cmp edi, 0xfffffffb
jbe 0x46d5ae
cmp edi, 0xfffffffd
jbe 0x46d6d5
mov edx, dword [esp + 0x30]
push 0
sub esi, edx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x4068]
push esi
push eax
push ebp
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46d69e
cmp dword [esp + 0x18], esi
jne 0x46d69a
test ebx, ebx
je 0x46d600
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx]
mov eax, ecx
inc ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x1c]
push ecx
push eax
mov ecx, ebx
call dword [edx]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x46d572
cmp edi, 1
je 0x46d66d
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x24]
push 0
push edx
lea eax, [esp + 0x68]
push 0x4000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46d55e
mov ebx, dword [esp + 0x10]
lea edx, [esp + 0x20]
push edx
call fcn.004710d0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
test esi, esi
je 0x46d6fa
push ebp
call esi
test esi, esi
je 0x46d6fa
push ebx
jmp 0x46d6f8
lea eax, [esp + 0x20]
push eax
call fcn.004710d0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
dec edi
neg edi
sbb edi, edi
and edi, 0xfffffffd
test esi, esi
je 0x46d6fa
push ebp
call esi
test esi, esi
je 0x46d6fa
mov ecx, dword [esp + 0x10]
push ecx
jmp 0x46d6f8
test eax, eax
jne 0x46d6a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x46d6ab
or edi, 0xffffffff
lea edx, [esp + 0x20]
push edx
call fcn.004710d0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
test esi, esi
je 0x46d6fa
push ebp
call esi
test esi, esi
je 0x46d6fa
mov eax, dword [esp + 0x10]
push eax
jmp 0x46d6f8
mov edi, 0xfffffffd
lea ecx, [esp + 0x20]
push ecx
call fcn.004710d0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
test esi, esi
je 0x46d6fa
push ebp
call esi
test esi, esi
je 0x46d6fa
mov edx, dword [esp + 0x10]
push edx
call esi
mov eax, edi
mov ecx, dword [esp + 0x8060]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x805c
ret 0xc