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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
xor ebx, ebx
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0x14]
test edi, edi
jle 0x43b604
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esi + 0x18]
xor ecx, ecx
mov eax, dword [eax + ebx*4]
inc ebx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], ecx
mov dword [esp], edx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
cmp dword [esi + 0x14], ebx
jg 0x43b5e0
mov edx, dword [0x459d70]
xor eax, eax
test edx, edx
je 0x43b618
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0xfffffff6
call sub.KERNEL32.dll_GetStdHandle
mov dword [ebp - 0x1c], eax
sub esp, 4
mov dword [esp], 0xfffffff5
call sub.KERNEL32.dll_GetStdHandle
mov dword [ebp - 0x20], eax
sub esp, 4
cmp dword [ebp - 0x1c], 0xffffffff
sete al
cmp dword [ebp - 0x20], 0xffffffff
sete dl
or eax, edx
test al, 1
jne 0x43b803
mov edi, dword [esi + 8]
test edi, edi
jne 0x43b75b
mov edi, dword [esi + 0xc]
test edi, edi
jne 0x43b83e
mov ebx, dword [esi + 0x14]
xor edi, edi
test ebx, ebx
jne 0x43b71c
jmp 0x43b7f6
and eax, 0xfffffffb
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_SetConsoleMode
mov eax, dword [ebx]
sub esp, 8
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp], eax
mov edx, dword [ebx]
mov eax, dword [ebp - 0x20]
call fcn.0043b590
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0xc]
dec eax
mov dword [esp + 8], eax
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
mov eax, dword [ebp - 0x10]
sub esp, 0x14
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_SetConsoleMode
mov edx, dword [ebp - 0x14]
sub esp, 8
mov eax, dword [ebx + 0xc]
cmp edx, eax
jbe 0x43b7a4
dec eax
mov edx, dword [ebx + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov byte [eax + edx], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x43b7bf
inc edi
cmp dword [esi + 0x14], edi
jbe 0x43b7f6
mov dword [ebp - 0x14], 0
mov eax, dword [esi + 0x18]
mov ebx, dword [eax + edi*4]
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_GetConsoleMode
mov edx, dword [ebp - 0x10]
sub esp, 8
mov ecx, dword [ebx + 4]
mov eax, edx
or eax, 3
test ecx, ecx
je 0x43b680
mov eax, edx
or eax, 7
jmp 0x43b683
mov edi, dword [esi + 4]
test edi, edi
je 0x43b65f
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp], eax
mov ebx, eax
mov edx, edi
mov eax, dword [ebp - 0x20]
call fcn.0043b590
mov eax, dword [esi + 4]
cmp byte [eax + ebx - 1], 0xa
je 0x43b65f
mov dword [esp], 1
mov edx, 0x4555f8
mov eax, dword [ebp - 0x20]
call fcn.0043b590
jmp 0x43b65f
lea eax, [edx - 2]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov byte [eax + edx], 0
mov eax, dword [ebx + 4]
test eax, eax
jne 0x43b712
xor eax, eax
mov ebx, 0x4555fa
inc edi
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x18]
mov dword [esp + 0xc], eax
mov eax, 2
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
cmp dword [esi + 0x14], edi
ja 0x43b71c
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], str.Cannot_get_standard_input_output_handles_n
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x29
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call fcn.0043b040
jmp 0x43b654
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp], eax
mov ebx, eax
mov edx, edi
mov eax, dword [ebp - 0x20]
call fcn.0043b590
mov eax, dword [esi + 0xc]
cmp byte [eax + ebx - 1], 0xa
je 0x43b66a
mov dword [esp], 1
mov edx, 0x4555f8
mov eax, dword [ebp - 0x20]
call fcn.0043b590
jmp 0x43b66a