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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51ddf0
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x58c250]
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, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
push 1
push 0x53bb00
lea ecx, [ebp + 8]
call fcn.00401ed0
push 0xa
push 0x53b6a0
lea ecx, [ebp + 8]
call fcn.00401ed0
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 1
push 0x53bb00
lea ecx, [ebp + 8]
call fcn.00401ed0
mov eax, dword [edi + 4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp + 8]
call fcn.00401ed0
mov ecx, dword [ebp + 8]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
push ecx
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xb0], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x410fd7
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov esi, esp
mov dword [ebp - 0xb4], esp
push eax
mov dword [ebp - 0xac], esi
call fcn.00401500
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.00405db0
mov esi, eax
cmp esi, 0xffffffff
jne 0x410fd7
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 0x410fcd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80004005
jmp 0x41127e
push ebx
lea ecx, [ebp - 0xa8]
push ecx
push 4
lea edx, [ebp - 0xa4]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xa8], 4
je 0x411039
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 - 0xb4], esp
push eax
mov dword [ebp - 0xac], esi
call fcn.00401500
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.00405db0
mov esi, eax
mov dword [ebp - 0xa4], ebx
push ebx
lea eax, [ebp - 0xa8]
push eax
push 4
lea ecx, [ebp - 0xb0]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xb0], 2
je 0x4110a5
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 - 0xb4], esp
push eax
mov dword [ebp - 0xac], esi
call fcn.00401500
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.00405db0
mov esi, eax
mov dword [ebp - 0xb0], 2
mov dword [ebp - 0xa4], ebx
cmp esi, 0xffffffff
jne 0x4110af
jmp 0x410fa7
mov eax, dword [edi + 0xc]
mov dword [ebp - 0xb8], ebx
mov ebx, dword [edi + 8]
mov dword [ebp - 0xac], eax
cmp ebx, eax
je 0x411120
jmp 0x4110d0
push ebx
lea ecx, [ebp - 0xa0]
call fcn.0040f680
mov byte [ebp - 4], 9
push 0
lea ecx, [ebp - 0xa0]
push ecx
push 0
call fcn.004b84c0
add dword [ebp - 0xb8], eax
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xa0]
call fcn.004066b0
add ebx, 0x90
cmp ebx, dword [ebp - 0xac]
jne 0x4110d0
mov eax, dword [ebp - 0xb8]
test eax, eax
jne 0x41112c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410fa7
add eax, dword [ebp - 0xa4]
push eax
call fcn.004dbe65
add esp, 4
push 0
lea edx, [ebp - 0xa8]
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 - 0xa4]
push 0
lea eax, [ebp - 0xa8]
push eax
add ecx, 0xfffffff8
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0xa4]
lea eax, [ebx + edx]
mov dword [ebp - 0xac], eax
mov eax, dword [edi + 0xc]
mov edi, dword [edi + 8]
mov dword [ebp - 0xb4], eax
cmp edi, eax
je 0x4111e9
jmp 0x4111a0
push edi
lea ecx, [ebp - 0xa0]
call fcn.0040f680
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0xac]
lea ecx, [ebp - 0xa0]
push ecx
push edx
call fcn.004b8830
add dword [ebp - 0xac], eax
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xa0]
call fcn.004066b0
add edi, 0x90
cmp edi, dword [ebp - 0xb4]
jne 0x4111a0
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0xb8]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [ebp - 0xa4], eax
push 0
lea ecx, [ebp - 0xa8]
push ecx
push 4
lea edx, [ebp - 0xa4]
push edx
push esi
call edi
push 0
lea eax, [ebp - 0xa8]
push eax
push 4
lea ecx, [ebp - 0xb0]
push ecx
push esi
call edi
mov eax, dword [ebp - 0xa4]
push 0
lea edx, [ebp - 0xa8]
push edx
push eax
push ebx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004efd7c
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 0x41127c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
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.004f0194
mov esp, ebp
pop ebp
ret 8