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

Disassembly:
push 0xffffffffffffffff
push 0x52a958
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56fcac]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov edi, ecx
xor ebp, ebp
push edi
mov dword [esp + 0x5c], ebp
call fcn.00406870
add esp, 4
test al, al
je 0x411667
call fcn.00406f10
test al, al
jne 0x411667
mov ebx, dword [esp + 0x60]
mov esi, dword [ebx]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esi, 0x2c
call edi
push eax
mov eax, dword [esi]
mov ecx, ebx
call eax
test al, al
je 0x41164f
mov eax, dword [esp + 0x64]
mov ecx, dword [eax + 0x80]
mov edx, dword [ebx]
mov edx, dword [edx + 0x20]
push ecx
push eax
mov ecx, ebx
call edx
lea eax, [esp + 0x68]
mov dword [esp + 0x58], 0xffffffff
call fcn.004113e0
mov al, 1
jmp 0x411ab5
call edi
lea eax, [esp + 0x68]
mov dword [esp + 0x58], 0xffffffff
call fcn.004113e0
jmp 0x411ab3
mov ebx, dword [esp + 0x64]
mov byte [esp + 0x58], 1
mov eax, dword [ebx + 0x60]
or eax, 0x8000000
cmp dword [edi + 0x18], 8
jb 0x411683
mov ecx, dword [edi + 4]
jmp 0x411686
lea ecx, [edi + 4]
push ebp
push eax
push 2
push ebp
mov esi, 1
push esi
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x41176a
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
mov eax, dword [esp + 0x60]
mov esi, dword [eax]
push edi
add esi, 0x2c
call ebp
mov edi, dword [esp + 0x64]
mov edx, dword [esi]
push eax
mov ecx, edi
call edx
test al, al
je 0x41171f
mov ecx, dword [ebx + 0x80]
mov eax, dword [edi]
mov edx, dword [eax + 0x20]
push ecx
push ebx
mov ecx, edi
call edx
mov dword [esp + 0x58], 0xffffffff
mov esi, dword [esp + 0x6c]
test esi, esi
je 0x411718
lea eax, [esi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x411718
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x411718
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov al, 1
jmp 0x411ab5
mov dword [esp + 0x58], 0xffffffff
mov esi, dword [esp + 0x6c]
test esi, esi
je 0x411ab3
lea eax, [esi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x411ab3
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x411ab3
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
jmp 0x411ab3
cmp dword [ebx + 0x6c], esi
ja 0x411a72
jb 0x41177e
cmp dword [ebx + 0x68], ebp
ja 0x411a72
cmp dword [ebx + 0x84], esi
ja 0x411a72
jb 0x411798
cmp dword [ebx + 0x80], ebp
ja 0x411a72
lea ecx, [esp + 0x18]
call fcn.0043bb70
push 0x80000
mov dword [esp + 0x44], vtable.GameMgr::GMBuffer_unsigned_char_.0
mov dword [esp + 0x50], ebp
call fcn.004aaa5e
mov edx, eax
add esp, 4
mov dword [esp + 0x48], edx
mov dword [esp + 0x44], 0x80000
mov byte [esp + 0x58], 2
mov edi, dword [ebx + 0x80]
cmp edi, ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
jbe 0x4119b3
cmp edi, 0x80000
mov ecx, 0x80000
ja 0x4117f2
mov ecx, edi
cmp edx, ebp
mov esi, dword [esp + 0x60]
mov eax, dword [esi + 0xb4]
je 0x411888
cmp dword [eax], 0xffffffff
je 0x411888
push ebp
mov dword [esp + 0x20], ebp
mov eax, dword [eax]
lea ebp, [esp + 0x20]
push ebp
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x411888
mov eax, dword [esp + 0x1c]
test eax, eax
seta cl
test cl, cl
je 0x411888
mov cl, byte [esi + 0xe4]
sub edi, eax
test cl, cl
mov dword [esp + 0x30], edi
jne 0x411888
mov eax, dword [ebx + 0x80]
mov edx, dword [esi]
mov edx, dword [edx + 0x20]
sub eax, edi
push eax
push ebx
mov ecx, esi
call edx
cmp dword [ebx + 0x70], 0
mov ebp, dword [esp + 0x68]
mov eax, dword [esp + 0x1c]
jne 0x41189f
mov edx, dword [esp + 0x48]
push 0
lea ecx, [esp + 0x24]
push ecx
push eax
mov esi, eax
mov eax, dword [esp + 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411888
cmp esi, dword [esp + 0x20]
je 0x41196e
lea ecx, [esp + 0x40]
call fcn.00403950
lea ecx, [esp + 0x18]
call fcn.0043b960
jmp 0x411651
xor ebx, ebx
test eax, eax
mov edi, eax
mov dword [esp + 0x24], ebx
jbe 0x411966
cmp dword [esp + 0x30], ebx
sete byte [esp + 0x38]
mov ecx, dword [esp + 0x60]
mov eax, dword [ecx + 0xe8]
test eax, eax
je 0x4118d4
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x4118d4
push eax
call sub.KERNEL32.dll_Sleep
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
mov edx, dword [ebp]
mov edx, dword [edx + 4]
push eax
lea ecx, [esp + 0x28]
push ecx
push edi
lea eax, [esi + ebx]
push eax
mov ecx, ebp
call edx
test al, al
je 0x41197d
mov eax, dword [esp + 0x24]
add ebx, eax
sub edi, eax
mov eax, dword [ebp]
mov edx, dword [eax + 0xc]
mov ecx, ebp
call edx
test eax, eax
jbe 0x41195e
xor esi, esi
mov dword [esp + 0x28], esi
mov eax, dword [ebp]
mov edx, dword [eax + 0x14]
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebp
call edx
cmp eax, esi
je 0x411954
mov ecx, dword [esp + 0x28]
cmp ecx, esi
jbe 0x411954
push 0
lea edx, [esp + 0x30]
push edx
push ecx
push eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], esi
push eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411996
cmp esi, dword [esp + 0x2c]
jne 0x411996
mov edx, dword [ebp]
mov eax, dword [edx + 0x18]
mov ecx, ebp
call eax
test edi, edi
ja 0x4118b8
mov ebx, dword [esp + 0x64]
mov edi, dword [esp + 0x30]
test edi, edi
jbe 0x4119b7
mov edx, dword [esp + 0x48]
xor ebp, ebp
jmp 0x4117e3
push esi
call fcn.004aaa63
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x411651
mov edx, dword [esp + 0x48]
push edx
call fcn.004aaa63
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x411651
mov ebp, dword [esp + 0x68]
cmp dword [ebx + 0x70], 0
je 0x411a33
lea ecx, [ecx]
mov edx, dword [ebp]
mov eax, dword [edx + 8]
mov ecx, ebp
call eax
mov edx, dword [ebp]
mov eax, dword [edx + 0xc]
mov ecx, ebp
call eax
test eax, eax
jbe 0x411a1b
mov dword [esp + 0x34], 0
mov edx, dword [ebp]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x34]
push eax
mov ecx, ebp
call edx
test eax, eax
je 0x411a1b
mov edi, dword [esp + 0x34]
test edi, edi
jbe 0x411a1b
lea ecx, [esp + 0x18]
push ecx
lea esi, [esp + 0x40]
mov ecx, eax
mov dword [esp + 0x40], 0
call fcn.0043ba10
test al, al
je 0x411888
mov edx, dword [ebp]
mov eax, dword [edx + 0xc]
mov ecx, ebp
call eax
test eax, eax
ja 0x4119c0
mov edx, dword [ebp]
mov eax, dword [edx + 0x18]
mov ecx, ebp
call eax
mov ecx, dword [ebx + 0x5c]
mov edx, dword [ebx + 0x58]
mov eax, dword [ebx + 0x54]
push ecx
mov ecx, dword [ebx + 0x50]
push edx
mov edx, dword [ebx + 0x4c]
push eax
mov eax, dword [ebx + 0x48]
push ecx
push edx
push eax
lea eax, [esp + 0x30]
call fcn.0043bc50
lea esi, [esp + 0x18]
call fcn.0043ba40
lea ecx, [esp + 0x40]
call fcn.00403950
mov ecx, esi
call fcn.0043b960
jmp 0x411637
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x58], 0xffffffff
mov esi, dword [esp + 0x6c]
cmp esi, ebp
je 0x411ab3
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x411ab3
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x411ab3
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
xor al, al
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 0x10