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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x42c044]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
xor ecx, ecx
push ebx
push esi
mov ebx, dword [ebp + 8]
push edi
push ecx
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x6c]
push eax
push 0x14
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x58], ebx
push eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x6c], ecx
push eax
push ecx
push ecx
push ecx
push dword [0x42c04c]
mov dword [ebp - 0x68], ecx
call dword [sym.imp.ntdll.dll_NtReadFile]
mov ecx, eax
test ecx, ecx
js 0x411873
mov edi, dword [ebx + 0x18]
mov edx, dword [ebp - 0x14]
cmp edi, edx
jbe 0x4116ed
mov ecx, 0x80000005
jmp 0x411873
cmp dword [ebp - 0x1c], 4
je 0x4116fd
mov ecx, 0xc0000059
jmp 0x411873
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
cmp ebx, esi
je 0x4117e5
lea eax, [edi + esi]
cmp eax, edx
jbe 0x411768
cmp ebx, esi
jbe 0x411719
mov ebx, dword [ebp - 0x18]
push 0xa
xor eax, eax
lea edi, [ebp - 0x44]
sub edx, esi
pop ecx
rep stosd dword es:[edi], eax
cmp edx, 0x28
jbe 0x41172d
push 0x28
pop edx
xor ecx, ecx
mov dword [ebp - 0x4c], esi
push ecx
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x48], ecx
push eax
push edx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x7c]
push eax
push ecx
push ecx
push ecx
push dword [0x42c04c]
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, eax
test ecx, ecx
js 0x411873
mov edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov edi, dword [edi + 0x18]
lea eax, [edi + esi]
jmp 0x4117c7
cmp ebx, edx
jae 0x4117d4
cmp ebx, esi
jb 0x4117d0
xor ecx, ecx
mov dword [ebp - 0x54], ebx
push ecx
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], ecx
push eax
push 0x28
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x84]
push eax
push ecx
push ecx
push ecx
push dword [0x42c04c]
call dword [sym.imp.ntdll.dll_NtReadFile]
mov ecx, eax
test ecx, ecx
js 0x411873
mov edx, dword [ebp - 0x14]
lea eax, [ebx + 0x28]
cmp eax, edx
ja 0x4117cd
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4117cd
add ebx, eax
cmp ebx, edx
ja 0x4117cd
mov eax, dword [ebp - 0x58]
mov eax, dword [eax + 0x18]
add eax, esi
cmp ebx, eax
jbe 0x41176d
jmp 0x4117d0
mov ebx, dword [ebp - 0x18]
cmp ebx, edx
jb 0x4117d7
mov ebx, dword [ebp - 0x18]
cmp ebx, dword [ebp - 0x18]
jne 0x4117e5
cmp esi, dword [ebp - 0x18]
je 0x411873
xor edi, edi
mov dword [ebp - 0x74], esi
push edi
lea eax, [ebp - 0x74]
mov dword [ebp - 0x70], edi
push eax
push 0x28
push dword [ebp - 0x58]
lea eax, [ebp - 0x5c]
push eax
push edi
push edi
push edi
push dword [0x42c04c]
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, eax
test ecx, ecx
js 0x411873
mov eax, dword [ebp - 0x60]
add esi, 0x28
test eax, eax
je 0x411847
push edi
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x54], esi
push ecx
push 0xc
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0x50], edi
push eax
push edi
push edi
push edi
push dword [0x42c04c]
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, eax
test ecx, ecx
js 0x411873
add esi, 0xc
push edi
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x10], esi
push eax
push 0x14
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], ebx
push eax
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x4c], edi
push eax
push edi
push edi
push edi
push dword [0x42c04c]
mov dword [ebp - 0x48], edi
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042a860
leave
ret 0xc