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

Disassembly:
mov eax, 0x43fa74
call fcn.004311b8
sub esp, 0x48
push ebx
xor ebx, ebx
cmp dword [ecx + 0x10c], ebx
push esi
push edi
mov dword [ebp - 0x28], ecx
je 0x428d92
cmp dword [ebp + 8], ebx
je 0x428d92
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 0x428da5
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.004292dd
test eax, eax
je 0x428d92
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 0x428de9
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 0x428d92
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 0x428e04
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x1c]
call fcn.004311d7
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x104]
test al, 6
pop ecx
mov byte [ebp + 0xf], bl
je 0x428e21
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 0x428e47
mov eax, dword [esi]
push edi
push ebx
mov ecx, esi
call dword [eax]
cmp al, bl
jne 0x428ed8
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 0x428edb
cmp byte [ebp - 0xd], bl
je 0x428e7f
cmp byte [ebp + 0xf], bl
je 0x428e7f
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 0x428ead
push dword [ebp - 0x18]
mov eax, dword [esi]
mov ecx, esi
push dword [ebp + 0x14]
call dword [eax]
cmp al, bl
jne 0x428ed8
mov eax, dword [ebp - 0x14]
sub dword [ebp - 0x18], eax
je 0x428edb
cmp eax, ebx
je 0x428edb
cmp dword [ebp - 0x18], 0x400
jae 0x428ec8
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 0x428e5e
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 0x428f35
cmp byte [ebp - 0xd], bl
jne 0x428f35
cmp byte [ebp + 0xf], bl
je 0x428f35
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.004091ee
mov eax, dword [ebp - 0x28]
pop ecx
jmp 0x428d94