Function at 0x41aaf6
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x47c144]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 8
mov dword [ebp - 0x214], ecx
jb 0x41ab1f
mov eax, dword [eax + 4]
jmp 0x41ab22
add eax, 4
push ebx
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x218], eax
cmp eax, 0xffffffff
jne 0x41ab4e
xor eax, eax
jmp 0x41ace9
push esi
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea edi, [esi + 2]
push edi
call fcn.0043e603
pop ecx
mov dword [ebp - 0x21c], eax
cmp eax, ebx
jne 0x41ab7f
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41ace5
push edi
push ebx
push eax
call fcn.004433d0
add esp, 0xc
push ebx
lea eax, [ebp - 0x220]
push eax
push esi
mov esi, dword [ebp - 0x21c]
push esi
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41abbc
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
jmp 0x41acdf
mov eax, 0xfeff
cmp word [esi], ax
jne 0x41ad91
mov esi, dword [ebp - 0x220]
shr esi, 1
dec esi
mov dword [ebp - 0x228], esi
call fcn.0041aa92
cmp eax, 1
jne 0x41ad91
xor eax, eax
push 0x20a
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push ebx
push eax
call fcn.004433d0
mov edi, dword [ebp - 0x214]
add esp, 0xc
push 0x40c47c
mov ecx, edi
call fcn.00413ccf
lea eax, [ebp - 0x210]
push eax
push 0x105
call fcn.00451340
test eax, eax
je 0x41aca9
lea esi, [ebp - 0x210]
call fcn.0041a4f3
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x41ac3c
sub eax, edx
sar eax, 1
mov ecx, 0x104
sub ecx, eax
je 0x41ac78
cmp dword [edi + 0x18], 8
jb 0x41ac5e
mov eax, dword [edi + 4]
jmp 0x41ac61
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x210]
push 0x106
push eax
call fcn.0043efc4
add esp, 0xc
jmp 0x41ac95
cmp dword [edi + 0x18], 8
jb 0x41ac83
mov eax, dword [edi + 4]
jmp 0x41ac86
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0041af48
pop ecx
pop ecx
lea eax, [ebp - 0x210]
push eax
mov ecx, edi
call fcn.00413ccf
mov esi, dword [ebp - 0x228]
cmp dword [edi + 0x18], 8
jb 0x41acb4
mov edi, dword [edi + 4]
jmp 0x41acb7
add edi, 4
push ebx
push 0x80000080
push 2
push ebx
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x214], eax
cmp eax, 0xffffffff
jne 0x41acf8
push dword [ebp - 0x21c]
call fcn.0043e687
pop ecx
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0043dff7
leave
ret 4
lea esi, [esi + esi + 2]
push esi
call fcn.0043e603
push esi
mov edi, eax
push ebx
push edi
call fcn.004433d0
mov eax, dword [ebp - 0x21c]
add esp, 0x10
push ebx
push ebx
push esi
push edi
push 0xffffffffffffffff
add eax, 2
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41ad2c
sub eax, esi
jne 0x41ad52
cmp edi, ebx
je 0x41ad42
push edi
call fcn.0043e687
pop ecx
push dword [ebp - 0x21c]
call fcn.0043e687
pop ecx
mov eax, ebx
jmp 0x41ace7
push ebx
lea ecx, [ebp - 0x224]
push ecx
push eax
push edi
push dword [ebp - 0x214]
mov dword [ebp - 0x224], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x41ad91
push edi
call fcn.0043e687
pop ecx
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
inc ebx
jmp 0x41ad42