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

Disassembly:
push 0xffffffffffffffff
push 0x5db440
mov eax, dword fs:[0]
push eax
mov eax, 0x1164
call fcn.005c2160
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x1160], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x1178]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x1188]
mov esi, dword [esp + 0x118c]
xor ebx, ebx
cmp ecx, ebx
je 0x50b408
cmp esi, ebx
je 0x50b408
mov ebp, 0xf
mov eax, ecx
mov dword [esp + 0x170], ebp
mov dword [esp + 0x16c], ebx
mov byte [esp + 0x15c], bl
lea edi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x50ad00
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x160]
call fcn.00408ea0
mov eax, esi
mov dword [esp + 0x1180], 2
mov dword [esp + 0x154], ebp
mov dword [esp + 0x150], ebx
mov byte [esp + 0x140], 0
lea ecx, [eax + 1]
nop
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x50ad40
sub eax, ecx
push eax
push esi
lea ecx, [esp + 0x144]
call fcn.00408ea0
mov ecx, dword [esp + 0x170]
cmp ecx, 0x10
mov edx, dword [esp + 0x15c]
mov byte [esp + 0x1180], 3
mov byte [esp + 0x17], 0x2f
mov byte [esp + 0x16], 0x5c
mov eax, edx
jae 0x50ad87
lea eax, [esp + 0x15c]
mov ebx, dword [esp + 0x16c]
lea edi, [eax + ebx]
test edi, edi
je 0x50adbb
cmp ecx, 0x10
mov eax, edx
jae 0x50ada3
lea eax, [esp + 0x15c]
cmp eax, edi
ja 0x50adbb
cmp ecx, 0x10
mov eax, edx
jae 0x50adb5
lea eax, [esp + 0x15c]
add eax, ebx
cmp edi, eax
jbe 0x50add5
call fcn.005bdf65
mov ecx, dword [esp + 0x170]
mov ebx, dword [esp + 0x16c]
mov edx, dword [esp + 0x15c]
cmp ecx, 0x10
lea ebp, [esp + 0x158]
jb 0x50afa0
test edx, edx
mov esi, edx
je 0x50ae11
cmp ecx, 0x10
mov eax, edx
jae 0x50adf9
lea eax, [esp + 0x15c]
cmp eax, esi
ja 0x50ae11
cmp ecx, 0x10
mov eax, edx
jae 0x50ae0b
lea eax, [esp + 0x15c]
add eax, ebx
cmp esi, eax
jbe 0x50ae16
call fcn.005bdf65
lea ecx, [esp + 0x17]
push ecx
lea edx, [esp + 0x1a]
push edx
push edi
push ebp
lea eax, [esp + 0x168]
push esi
push eax
call fcn.0045e5a0
mov ecx, dword [esp + 0x16c]
mov edx, dword [esp + 0x158]
add esp, 0x18
cmp ecx, 0x10
mov byte [esp + 0x16], 0x2f
mov byte [esp + 0x17], 0x5c
mov eax, edx
jae 0x50ae59
lea eax, [esp + 0x140]
mov ebx, dword [esp + 0x150]
lea edi, [eax + ebx]
test edi, edi
je 0x50ae8d
cmp ecx, 0x10
mov eax, edx
jae 0x50ae75
lea eax, [esp + 0x140]
cmp eax, edi
ja 0x50ae8d
cmp ecx, 0x10
mov eax, edx
jae 0x50ae87
lea eax, [esp + 0x140]
add eax, ebx
cmp edi, eax
jbe 0x50aea7
call fcn.005bdf65
mov ecx, dword [esp + 0x154]
mov ebx, dword [esp + 0x150]
mov edx, dword [esp + 0x140]
cmp ecx, 0x10
lea ebp, [esp + 0x13c]
jb 0x50afac
test edx, edx
mov esi, edx
je 0x50aee3
cmp ecx, 0x10
mov eax, edx
jae 0x50aecb
lea eax, [esp + 0x140]
cmp eax, esi
ja 0x50aee3
cmp ecx, 0x10
mov eax, edx
jae 0x50aedd
lea eax, [esp + 0x140]
add eax, ebx
cmp esi, eax
jbe 0x50aee8
call fcn.005bdf65
lea ecx, [esp + 0x16]
push ecx
lea edx, [esp + 0x1b]
push edx
push edi
push ebp
lea eax, [esp + 0x14c]
push esi
push eax
call fcn.0045e5a0
mov ecx, dword [esp + 0x158]
mov esi, 0x10
add esp, 0x18
cmp dword [esp + 0x154], esi
jae 0x50af21
lea ecx, [esp + 0x140]
cmp dword [esp + 0x170], esi
mov eax, dword [esp + 0x15c]
jae 0x50af38
lea eax, [esp + 0x15c]
push ecx
push eax
call fcn.005be4ae
add esp, 8
test eax, eax
jne 0x50afb8
cmp dword [esp + 0x154], esi
jb 0x50af5f
mov eax, dword [esp + 0x140]
push eax
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x170], esi
mov dword [esp + 0x154], 0xf
mov dword [esp + 0x150], 0
mov byte [esp + 0x140], 0
jb 0x50af96
mov ecx, dword [esp + 0x15c]
push ecx
call fcn.005a1b1d
add esp, 4
mov eax, 1
jmp 0x50b4be
lea esi, [esp + 0x15c]
jmp 0x50adeb
lea esi, [esp + 0x140]
jmp 0x50aebd
cmp dword [esp + 0x1190], 0
je 0x50afed
cmp dword [esp + 0x154], esi
mov eax, dword [esp + 0x140]
jae 0x50afd9
lea eax, [esp + 0x140]
push 0
push eax
call fcn.00514160
add esp, 8
cmp eax, 0xffffffff
jne 0x50b340
cmp dword [esp + 0x170], esi
mov eax, dword [esp + 0x15c]
jae 0x50b004
lea eax, [esp + 0x15c]
push 0x63b988
push eax
call fcn.005bd438
mov edi, eax
add esp, 8
mov dword [esp + 0x38], edi
test edi, edi
mov bl, 4
mov byte [esp + 0x1180], bl
jne 0x50b166
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040a750
mov eax, dword [esp + 0x15c]
mov esi, 0x10
cmp dword [esp + 0x170], esi
mov byte [esp + 0x1180], 5
jae 0x50b05a
lea eax, [esp + 0x15c]
push eax
lea edx, [esp + 0x40]
push edx
call fcn.00409270
add esp, 8
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x40]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1180], 6
jb 0x50b088
mov eax, dword [eax + 4]
jmp 0x50b08b
add eax, 4
push eax
push str.BaseLib::CxxSDCopyFile
push 0x7a0
push str..common_function.cpp
push 0x803
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x18]
call fcn.0040b640
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1180], bl
call fcn.004094e0
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040a750
lea ecx, [esp + 0x3c]
push 0x601420
push ecx
mov byte [esp + 0x1188], 7
call fcn.00409270
add esp, 8
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x40]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1180], 8
jb 0x50b10c
mov eax, dword [eax + 4]
jmp 0x50b10f
add eax, 4
push eax
push str.BaseLib::CxxSDCopyFile
push 0x7a1
push str..common_function.cpp
push 0x803
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x18]
call fcn.0040b640
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1180], bl
call fcn.004094e0
lea ecx, [esp + 0x13c]
call fcn.0040b640
lea ecx, [esp + 0x158]
call fcn.0040b640
jmp 0x50b4bc
mov eax, dword [esp + 0x140]
mov esi, 0x10
cmp dword [esp + 0x154], esi
jae 0x50b182
lea eax, [esp + 0x140]
push 0x63b990
push eax
call fcn.005bd438
mov ebp, eax
add esp, 8
mov dword [esp + 0x34], ebp
test ebp, ebp
mov byte [esp + 0x1180], 9
jne 0x50b2d1
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040a750
cmp dword [esp + 0x154], esi
mov eax, dword [esp + 0x140]
mov byte [esp + 0x1180], 0xa
jae 0x50b1d2
lea eax, [esp + 0x140]
push eax
lea eax, [esp + 0x40]
push eax
call fcn.00409270
add esp, 8
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x40]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1180], 0xb
jb 0x50b200
mov eax, dword [eax + 4]
jmp 0x50b203
add eax, 4
push eax
push str.BaseLib::CxxSDCopyFile
push 0x7a8
push str..common_function.cpp
push 0x803
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x18]
call fcn.0040b640
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1180], 9
call fcn.004094e0
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040a750
lea edx, [esp + 0x3c]
push 0x601404
push edx
mov byte [esp + 0x1188], 0xc
call fcn.00409270
add esp, 8
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x40]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1180], 0xd
jb 0x50b285
mov eax, dword [eax + 4]
jmp 0x50b288
add eax, 4
push eax
push str.BaseLib::CxxSDCopyFile
push 0x7a9
push str..common_function.cpp
push 0x803
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x18]
call fcn.0040b640
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1180], 9
call fcn.004094e0
push edi
call fcn.005bd8f3
add esp, 4
jmp 0x50b149
push edi
call fcn.005bf210
add esp, 4
test eax, eax
jne 0x50b331
mov ebx, dword [esp + 0x1194]
test ebx, ebx
je 0x50b2ee
cmp dword [ebx], 0
jne 0x50b331
push edi
push 0x1000
lea ecx, [esp + 0x17c]
push 1
push ecx
call fcn.005be7ff
mov esi, eax
add esp, 0x10
test esi, esi
jle 0x50b324
push ebp
push esi
lea edx, [esp + 0x17c]
push 1
push edx
call fcn.005bd6b0
add esp, 0x10
cmp eax, esi
jne 0x50b362
push edi
call fcn.005bf210
add esp, 4
test eax, eax
je 0x50b2e5
push ebp
call fcn.005bd8f3
push edi
call fcn.005bd8f3
add esp, 8
lea ecx, [esp + 0x13c]
call fcn.0040b640
lea ecx, [esp + 0x158]
call fcn.0040b640
mov eax, 1
jmp 0x50b4be
push 1
push 2
lea ecx, [esp + 0xc4]
call fcn.0040a750
lea eax, [esp + 0xbc]
push 0x6013f8
push eax
mov byte [esp + 0x1188], 0xe
call fcn.00409270
add esp, 8
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0xc0]
call fcn.00408c00
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1180], 0xf
jb 0x50b3b3
mov eax, dword [eax + 4]
jmp 0x50b3b6
add eax, 4
push eax
push str.BaseLib::CxxSDCopyFile
push 0x7ba
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x18]
call fcn.0040b640
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1180], 9
call fcn.004094e0
push ebp
call fcn.005bd8f3
push edi
call fcn.005bd8f3
add esp, 8
jmp 0x50b149
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040a750
lea edx, [esp + 0x3c]
push 0x6013d0
push edx
mov dword [esp + 0x1188], ebx
call fcn.00409270
add esp, 8
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x40]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1180], 1
jb 0x50b453
mov eax, dword [eax + 4]
jmp 0x50b456
add eax, 4
push eax
push str.BaseLib::CxxSDCopyFile
push 0x788
push str..common_function.cpp
push 0x803
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x30], esi
jb 0x50b48a
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0x88]
mov dword [esp + 0x1180], 0xffffffff
call fcn.00409510
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x8c], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x1178]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1160]
xor ecx, esp
call fcn.005bd2d7
add esp, 0x1170
ret