Function at 0x527790
Capabilities:
Create directory
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x65b7ee
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
push 1
push 0x66ea40
lea ecx, [ebp + 8]
call fcn.00401710
push 0xa
push 0x679d10
lea ecx, [ebp + 8]
call fcn.00401710
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 1
push 0x66ea40
lea ecx, [ebp + 8]
call fcn.00401710
mov eax, dword [edi + 4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp + 8]
call fcn.00401710
mov ecx, dword [ebp + 8]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
push ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x527899
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov esi, esp
mov dword [ebp - 0x20], esp
push eax
mov dword [ebp - 0x18], esi
call fcn.004011f0
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 2
mov byte [ebp - 4], bl
mov ecx, edi
call fcn.00527560
mov esi, eax
cmp esi, 0xffffffff
jne 0x527899
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x527881
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
lea ecx, [ebp - 0x14]
push ecx
push 4
lea edx, [ebp - 0x10]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x14], 4
je 0x5278e9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov esi, esp
mov dword [ebp - 0x20], esp
push eax
mov dword [ebp - 0x18], esi
call fcn.004011f0
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 5
mov byte [ebp - 4], 0
mov ecx, edi
call fcn.00527560
mov esi, eax
mov dword [ebp - 0x10], ebx
push ebx
lea eax, [ebp - 0x14]
push eax
push 4
lea ecx, [ebp - 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x1c], 2
je 0x527940
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov esi, esp
mov dword [ebp - 0x20], esp
push eax
mov dword [ebp - 0x18], esi
call fcn.004011f0
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 7
mov byte [ebp - 4], 0
mov ecx, edi
call fcn.00527560
mov esi, eax
mov dword [ebp - 0x1c], 2
mov dword [ebp - 0x10], ebx
cmp esi, 0xffffffff
jne 0x52794a
jmp 0x52785b
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x24], ebx
mov ebx, dword [edi + 8]
mov dword [ebp - 0x18], eax
cmp ebx, eax
je 0x5279a7
lea ebx, [ebx]
push ebx
lea ecx, [ebp - 0xb4]
call fcn.004cdf70
mov byte [ebp - 4], 9
push 0
lea ecx, [ebp - 0xb4]
push ecx
push 0
call fcn.005c0ae0
add dword [ebp - 0x24], eax
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.004cd430
add ebx, 0x90
cmp ebx, dword [ebp - 0x18]
jne 0x527960
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x5279b3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x52785b
add eax, dword [ebp - 0x10]
push eax
call fcn.005fb5ce
add esp, 4
push 0
lea edx, [ebp - 0x14]
push edx
push 0
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, 8
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x10]
push 0
lea eax, [ebp - 0x14]
push eax
add ecx, 0xfffffff8
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x10]
lea eax, [ebx + edx]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0xc]
mov edi, dword [edi + 8]
mov dword [ebp - 0x20], eax
cmp edi, eax
je 0x527a50
jmp 0x527a10
push edi
lea ecx, [ebp - 0xb4]
call fcn.004cdf70
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0xb4]
push ecx
push edx
call fcn.005c0df0
add dword [ebp - 0x18], eax
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.004cd430
add edi, 0x90
cmp edi, dword [ebp - 0x20]
jne 0x527a10
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [ebp - 0x10], eax
push 0
lea ecx, [ebp - 0x14]
push ecx
push 4
lea edx, [ebp - 0x10]
push edx
push esi
call edi
push 0
lea eax, [ebp - 0x14]
push eax
push 4
lea ecx, [ebp - 0x1c]
push ecx
push esi
call edi
mov eax, dword [ebp - 0x10]
push 0
lea edx, [ebp - 0x14]
push edx
push eax
push ebx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0060faf6
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x527acb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8