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

Disassembly:
mov eax, 0x4419a4
call fcn.00432c38
sub esp, 0x48
push ebx
xor ebx, ebx
cmp dword [ecx + 0x10c], ebx
push esi
push edi
mov dword [ebp - 0x28], ecx
je 0x42a6b3
cmp dword [ebp + 8], ebx
je 0x42a6b3
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 0x42a6c6
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.0042abfe
test eax, eax
je 0x42a6b3
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 0x42a70a
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 0x42a6b3
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 0x42a725
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x1c]
call fcn.00432c57
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x104]
test al, 6
pop ecx
mov byte [ebp + 0xf], bl
je 0x42a742
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 0x42a768
mov eax, dword [esi]
push edi
push ebx
mov ecx, esi
call dword [eax]
cmp al, bl
jne 0x42a7f9
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 0x42a7fc
cmp byte [ebp - 0xd], bl
je 0x42a7a0
cmp byte [ebp + 0xf], bl
je 0x42a7a0
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 0x42a7ce
push dword [ebp - 0x18]
mov eax, dword [esi]
mov ecx, esi
push dword [ebp + 0x14]
call dword [eax]
cmp al, bl
jne 0x42a7f9
mov eax, dword [ebp - 0x14]
sub dword [ebp - 0x18], eax
je 0x42a7fc
cmp eax, ebx
je 0x42a7fc
cmp dword [ebp - 0x18], 0x400
jae 0x42a7e9
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 0x42a77f
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 0x42a856
cmp byte [ebp - 0xd], bl
jne 0x42a856
cmp byte [ebp + 0xf], bl
je 0x42a856
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.00401915
push dword [ebp - 0x20]
call fcn.00432291
mov eax, dword [ebp - 0x28]
pop ecx
jmp 0x42a6b5