Function at 0x45d110
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x466b5e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
mov eax, dword [esp + 0x74]
push ebx
xor ebx, ebx
push esi
cmp eax, ebx
push edi
mov dword [esp + 0x1c], 0x4675f0
mov dword [esp + 0x3c], 0x4675e8
jne 0x45d14a
mov eax, 0x47e390
push ebp
lea ecx, [esp + 0x84]
push ebx
push ecx
push eax
lea ecx, [esp + 0x2c]
call fcn.0040b1f1
lea edx, [esp + 0x48]
mov dword [esp + 0x7c], ebx
push edx
call fcn.0045cd60
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
mov ecx, eax
mov byte [esp + 0x94], 1
call fcn.00453840
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [esp + 0x84], edi
lea eax, [esp + 0x48]
lea ecx, [esp + 0x68]
neg eax
sbb eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, ecx
mov byte [esp + 0x7c], 5
mov edx, dword [eax]
mov esi, dword [edx + 4]
add esi, eax
call ebp
lea ecx, [esp + 0x48]
mov dword [esi], eax
neg ecx
sbb ecx, ecx
lea eax, [esp + 0x5c]
and ecx, eax
call fcn.00430612
lea ecx, [esp + 0x48]
lea edx, [esp + 0x4c]
neg ecx
sbb ecx, ecx
push 1
and ecx, edx
mov byte [esp + 0x80], 4
call fcn.0040b46b
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 4]
mov edx, dword [esp + ecx + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [0x47ec99]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp al, bl
jne 0x45d275
push ebx
push ebx
push ebx
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
call esi
lea eax, [esp + 0x10]
push ebx
push eax
lea ecx, [esp + 0x1c]
push 2
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov ecx, 0xfeff
je 0x45d24e
cmp dword [esp + 0x10], 2
jne 0x45d24e
cmp word [esp + 0x14], cx
sete byte [0x47ec99]
cmp byte [0x47ec99], bl
jne 0x45d26e
lea edx, [esp + 0x1c]
push ebx
push edx
lea eax, [esp + 0x20]
push 2
push eax
push edi
mov dword [esp + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [0x47ec99], 1
push 2
push ebx
push ebx
push edi
call esi
mov eax, dword [esp + 0x28]
cmp eax, ebx
jne 0x45d289
mov eax, 0x4675fc
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x1c]
push ebx
push ecx
lea ecx, [edx + edx]
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, ebx
je 0x45d2af
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x45d2af
push edi
call eax
lea eax, [esp + 0x20]
lea edx, [esp + 0x40]
neg eax
sbb eax, eax
and eax, edx
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
add esi, eax
call ebp
mov dword [esi], eax
lea esi, [esp + 0x20]
neg esi
sbb esi, esi
lea edx, [esp + 0x34]
and esi, edx
mov eax, dword [esi]
push eax
call fcn.0043ba49
mov ecx, dword [esi + 8]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
add esp, 4
push ecx
call edi
lea esi, [esp + 0x20]
lea edx, [esp + 0x24]
neg esi
sbb esi, esi
pop ebp
and esi, edx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x45d31c
mov cl, byte [eax - 1]
cmp cl, bl
je 0x45d316
cmp cl, 0xff
je 0x45d316
dec cl
mov byte [eax - 1], cl
jmp 0x45d31c
add eax, 0xfffffffe
push eax
call edi
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
mov edx, dword [esp + ecx + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov ecx, dword [esp + 0x68]
pop ebx
mov dword fs:[0], ecx
add esp, 0x70
ret 4