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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4693c1
mov eax, dword fs:[0]
push eax
mov eax, 0x10074
call fcn.00447bf0
mov eax, dword [0x4a3a10]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10040]
mov ebx, dword [ebp + 0xc]
push edi
push eax
mov dword [ebp - 0x10080], edi
mov dword [ebp - 0x10070], ebx
call fcn.0041fb60
lea eax, [ebp - 0x10028]
mov dword [ebp - 4], 0
push ebx
push eax
call fcn.0041fb60
add esp, 0x10
cmp dword [ebp - 0x1002c], 8
lea eax, [ebp - 0x10040]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
cmovae eax, dword [ebp - 0x10040]
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push eax
mov byte [ebp - 4], 1
call esi
mov ebx, eax
mov dword [ebp - 0x10074], ebx
cmp ebx, 0xffffffff
jne 0x41dfa9
call fcn.0042edd0
mov esi, eax
lea eax, [ebp - 0x10058]
push eax
call fcn.0041fc40
add esp, 4
push eax
push edi
push 0x28
push str.Failed_to_open_file__for_reading:_
push 4
sub esp, 0xc
mov dword [ebp - 0x1006c], 0
mov eax, esp
mov dword [ebp - 0x10068], 0
movq xmm0, qword [ebp - 0x1006c]
mov ecx, esi
mov byte [ebp - 4], 2
movq qword [eax], xmm0
mov dword [eax + 8], 0
call fcn.00419180
mov ecx, dword [ebp - 0x10044]
cmp ecx, 0x10
jb 0x41e048
mov edx, dword [ebp - 0x10058]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x41df98
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41e27c
push ecx
push edx
call fcn.0044781c
add esp, 8
xor bl, bl
jmp 0x41e1c5
cmp dword [ebp - 0x10014], 8
lea eax, [ebp - 0x10028]
push 0
cmovae eax, dword [ebp - 0x10028]
push 0x80000080
push 2
push 0
push 0
push 0x40000000
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x41e04f
call fcn.0042edd0
mov esi, eax
lea eax, [ebp - 0x10058]
push eax
call fcn.0041fc40
add esp, 4
push eax
push dword [ebp - 0x10070]
mov dword [ebp - 0x1006c], 0
mov ecx, esi
push 0x28
push str.Failed_to_open_file__for_writing:_
push 4
sub esp, 0xc
mov dword [ebp - 0x10068], 0
movq xmm0, qword [ebp - 0x1006c]
mov eax, esp
mov byte [ebp - 4], 3
movq qword [eax], xmm0
mov dword [eax + 8], 0
call fcn.00419180
lea ecx, [ebp - 0x10058]
call fcn.0040fdb0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
jmp 0x41e1c5
mov dword [ebp - 0x10060], 0x10000
mov dword [ebp - 0x1005c], 0
push 0
lea eax, [ebp - 0x1005c]
push eax
push 0x10000
lea eax, [ebp - 0x10010]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test eax, eax
je 0x41e0cc
mov eax, dword [ebp - 0x1005c]
test eax, eax
je 0x41e135
push 0
lea ecx, [ebp - 0x10078]
push ecx
push eax
lea eax, [ebp - 0x10010]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41e148
mov eax, dword [ebp - 0x1005c]
cmp eax, dword [ebp - 0x10078]
jne 0x41e148
mov bl, 1
jmp 0x41e139
call fcn.0042edd0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1007c], eax
mov ecx, esi
lea eax, [ebp - 0x1007c]
mov dword [ebp - 0x1006c], 0
push eax
push dword [ebp - 0x10080]
lea eax, [ebp - 0x10060]
mov dword [ebp - 0x10068], 0
movq xmm0, qword [ebp - 0x1006c]
push eax
push 0x2a
push str.Failed_to_read__bytes_from_file_:_
push 4
sub esp, 0xc
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], 0
call fcn.0041d5a0
mov eax, dword [ebp - 0x1005c]
test bl, bl
je 0x41e1ad
test eax, eax
je 0x41e1ad
mov ebx, dword [ebp - 0x10074]
jmp 0x41e063
xor bl, bl
call fcn.0042edd0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10060], eax
mov ecx, esi
lea eax, [ebp - 0x10060]
mov dword [ebp - 0x1006c], 0
push eax
push dword [ebp - 0x10070]
lea eax, [ebp - 0x1005c]
mov dword [ebp - 0x10068], 0
movq xmm0, qword [ebp - 0x1006c]
push eax
push 0x2b
push str.Failed_to_write__bytes_from_file_:_
push 4
sub esp, 0xc
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], 0
call fcn.0041d5a0
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x10074]
call esi
mov ecx, dword [ebp - 0x10014]
cmp ecx, 8
jb 0x41e205
mov edx, dword [ebp - 0x10028]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41e1fb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41e281
push ecx
push edx
call fcn.0044781c
add esp, 8
mov ecx, dword [ebp - 0x1002c]
xor eax, eax
mov dword [ebp - 0x10018], 0
mov dword [ebp - 0x10014], 7
mov word [ebp - 0x10028], ax
cmp ecx, 8
jb 0x41e25e
mov edx, dword [ebp - 0x10040]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41e254
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41e281
push ecx
push edx
call fcn.0044781c
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00447a97
mov esp, ebp
pop ebp
ret
call fcn.0044c8cf
call fcn.0044c8cf
int3