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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x58f660]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax + 0x1c]
mov dword [ebp - 0x210], eax
mov eax, dword [eax + 0x20]
cmp byte [eax + 0x75], 0
mov esi, ecx
mov dword [ebp - 0x228], esi
je 0x41eb0d
push 0
lea ecx, [ebp - 0x20c]
push 0
push ecx
mov ebx, 0x200
call fcn.0041f5c0
xor edx, edx
add esp, 0xc
cmp eax, edx
jne 0x41eb0f
xor eax, eax
lea ecx, [ebp - 0x4a]
mov edi, edi
cmp byte [ecx], dl
je 0x41e8dd
inc eax
add ecx, 0x10
cmp eax, 4
jl 0x41e8d0
cmp eax, edx
je 0x41eb0d
cmp eax, 4
jg 0x41e8eb
dec eax
mov ecx, dword [ebp - 0x210]
mov ecx, dword [ecx + 0x20]
sub edi, dword [ecx + 0x6c]
shl eax, 4
mov ebx, eax
sub edi, dword [ebp + ebx - 0x46]
lea eax, [ebp + ebx - 0x46]
push edx
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x210]
push eax
mov dword [ebp + ebx - 0x42], edi
mov dword [ebp - 0x230], edi
push edx
mov edi, esi
push edi
mov dword [ebp - 0x218], edx
mov dword [ebp - 0x214], edx
mov dword [ebp - 0x210], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x214], eax
call esi
mov ecx, dword [ebp - 0x214]
cmp ecx, 0xffffffff
jne 0x41e955
test eax, eax
jne 0x41e963
cmp ecx, 0xffffffff
jne 0x41e963
cmp dword [ebp - 0x210], 0
je 0x41e98f
push 0
lea ecx, [ebp - 0x218]
push ecx
push 0x200
lea edx, [ebp - 0x20c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41e98f
cmp dword [ebp - 0x218], 0x200
je 0x41e999
call esi
test eax, eax
jne 0x41eb0f
cmp byte [ebp + ebx - 0x4a], 5
jne 0x41eb0d
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
mov dword [ebp - 0x22c], ecx
mov dword [ebp - 0x218], 0
lea esp, [esp]
mov edi, dword [ebp - 0x218]
add edi, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x228]
push 0
xor ebx, ebx
lea ecx, [ebp - 0x220]
shld ebx, edi, 9
push ecx
shl edi, 9
push edi
push edx
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x220], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x224], eax
call esi
mov ecx, dword [ebp - 0x224]
cmp ecx, 0xffffffff
jne 0x41ea19
test eax, eax
jne 0x41ea27
cmp ecx, 0xffffffff
jne 0x41ea27
cmp dword [ebp - 0x220], 0
je 0x41ea59
mov edx, dword [ebp - 0x228]
push 0
lea eax, [ebp - 0x210]
push eax
push 0x200
lea ecx, [ebp - 0x20c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ea59
cmp dword [ebp - 0x210], 0x200
je 0x41ea63
call esi
test eax, eax
jne 0x41eb0f
cmp byte [ebp - 0x3a], 5
jne 0x41ea77
mov eax, dword [ebp - 0x36]
mov dword [ebp - 0x218], eax
jmp 0x41e9c0
mov eax, dword [ebp - 0x230]
sub eax, dword [ebp - 0x46]
push 0
sub eax, dword [ebp - 0x218]
lea ecx, [ebp - 0x220]
push ecx
push edi
mov dword [ebp - 0x224], edi
mov edi, dword [ebp - 0x228]
push edi
mov dword [ebp - 0x42], eax
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x220], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x224], eax
call esi
mov ecx, dword [ebp - 0x224]
cmp ecx, 0xffffffff
jne 0x41eacd
test eax, eax
jne 0x41eadb
cmp ecx, 0xffffffff
jne 0x41eadb
cmp dword [ebp - 0x220], 0
je 0x41eb07
push 0
lea edx, [ebp - 0x210]
push edx
push 0x200
lea eax, [ebp - 0x20c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41eb07
cmp dword [ebp - 0x210], 0x200
je 0x41eb0d
call esi
test eax, eax
jne 0x41eb0f
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00514194
mov esp, ebp
pop ebp
ret 4