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

Disassembly:
mov eax, 0x43341c
call fcn.00425db8
sub esp, 0x48
push ebx
xor ebx, ebx
cmp dword [ecx + 0x10c], ebx
push esi
push edi
mov dword [ebp - 0x28], ecx
je 0x41e62e
cmp dword [ebp + 8], ebx
je 0x41e62e
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, 0x80
push ebx
push edi
push 3
push ebx
push 3
add ecx, 4
push SysReAllocStringLen
push ecx
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x41e641
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x118], eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
mov ecx, dword [ebp - 0x28]
push ebx
push ebx
push dword [ebp + 0xc]
push eax
call fcn.0041eb79
test eax, eax
je 0x41e62e
push ebx
push edi
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 0x10]
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x2c], eax
jne 0x41e685
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x28]
push dword [ebp - 0x24]
mov dword [ecx + 0x118], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41e62e
mov esi, dword [ebp + 8]
mov eax, 0x400
mov dword [ebp - 0x1c], eax
mov edi, dword [esi + 0x10c]
cmp edi, eax
mov dword [ebp - 0x18], edi
jae 0x41e6a0
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x1c]
call fcn.00425dd7
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x104]
test al, 6
pop ecx
mov byte [ebp + 0xf], bl
je 0x41e6bd
mov byte [ebp + 0xf], 1
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x28], 1
shr al, 2
and al, 1
cmp esi, ebx
mov byte [ebp - 0xd], al
je 0x41e6e3
mov eax, dword [esi]
push edi
push ebx
mov ecx, esi
call dword [eax]
cmp al, bl
jne 0x41e774
lea eax, [ebp - 0x14]
push ebx
push eax
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
mov dword [ebp + 0x14], ebx
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call edi
test eax, eax
je 0x41e777
cmp byte [ebp - 0xd], bl
je 0x41e71b
cmp byte [ebp + 0xf], bl
je 0x41e71b
push dword [ebp + 8]
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call fcn.004013aa
add esp, 0xc
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x14]
add dword [ebp + 0x14], eax
cmp esi, ebx
je 0x41e749
push dword [ebp - 0x18]
mov eax, dword [esi]
mov ecx, esi
push dword [ebp + 0x14]
call dword [eax]
cmp al, bl
jne 0x41e774
mov eax, dword [ebp - 0x14]
sub dword [ebp - 0x18], eax
je 0x41e777
cmp eax, ebx
je 0x41e777
cmp dword [ebp - 0x18], 0x400
jae 0x41e764
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
jmp 0x41e6fa
mov dword [ebp - 0x28], ebx
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x2c]
call esi
cmp dword [ebp - 0x28], ebx
je 0x41e7d1
cmp byte [ebp - 0xd], bl
jne 0x41e7d1
cmp byte [ebp + 0xf], bl
je 0x41e7d1
lea eax, [ebp + 0x13]
push 1
push eax
lea ecx, [ebp - 0x54]
push dword [ebp + 0x10]
call fcn.004014ff
mov ecx, eax
mov dword [ebp - 4], ebx
call fcn.004016f0
push dword [ebp + 8]
push eax
call fcn.00401408
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0x54]
call fcn.0040191f
push dword [ebp - 0x20]
call fcn.0042540e
mov eax, dword [ebp - 0x28]
pop ecx
jmp 0x41e630