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

Disassembly:
mov eax, 0x430df4
call fcn.00423e18
sub esp, 0x48
push ebx
xor ebx, ebx
cmp dword [ecx + 0x10c], ebx
push esi
push edi
mov dword [ebp - 0x28], ecx
je 0x41c3df
cmp dword [ebp + 8], ebx
je 0x41c3df
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 0x41c3f2
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.0041c92a
test eax, eax
je 0x41c3df
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 0x41c436
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 0x41c3df
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 0x41c451
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x1c]
call fcn.00423e37
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x104]
test al, 6
pop ecx
mov byte [ebp + 0xf], bl
je 0x41c46e
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 0x41c494
mov eax, dword [esi]
push edi
push ebx
mov ecx, esi
call dword [eax]
cmp al, bl
jne 0x41c525
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 0x41c528
cmp byte [ebp - 0xd], bl
je 0x41c4cc
cmp byte [ebp + 0xf], bl
je 0x41c4cc
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 0x41c4fa
push dword [ebp - 0x18]
mov eax, dword [esi]
mov ecx, esi
push dword [ebp + 0x14]
call dword [eax]
cmp al, bl
jne 0x41c525
mov eax, dword [ebp - 0x14]
sub dword [ebp - 0x18], eax
je 0x41c528
cmp eax, ebx
je 0x41c528
cmp dword [ebp - 0x18], 0x400
jae 0x41c515
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 0x41c4ab
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 0x41c582
cmp byte [ebp - 0xd], bl
jne 0x41c582
cmp byte [ebp + 0xf], bl
je 0x41c582
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.0040172d
push dword [ebp + 8]
push eax
call fcn.00401408
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0x54]
call fcn.0040195c
push dword [ebp - 0x20]
call fcn.00423468
mov eax, dword [ebp - 0x28]
pop ecx
jmp 0x41c3e1