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

Disassembly:
push ebp
lea ebp, [esp - 0x48]
sub esp, 0x48
push 0xffffffffffffffff
push 0x1024adb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp + 0x34], ebx
mov dword [ebp - 4], 0
mov dword [ebp + 0x40], vtable.WM::GMFile.0
mov dword [ebp + 0x44], 0xffffffff
push 0x80
push 2
push 1
push 0x40000000
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x40]
push dword [ebp + 0x50]
call sym.WMCommon.dll_public:_bool___thiscall_WM::GMFile::Create_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___unsigned_int__unsigned_int__unsigned_int__unsigned_int_
test al, al
je 0x1008a6b9
mov ecx, dword [ebx + 0x20]
mov edi, dword [ebx + 0x1c]
test ecx, ecx
je 0x1008a6b9
mov eax, dword [ebp + 0x44]
cmp eax, 0xffffffff
je 0x1008a6bc
push 0
lea edx, [ebp + 0x50]
push edx
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1008a6b9
mov esi, dword [ebp + 0x50]
cmp edi, esi
jne 0x1008a6b9
cmp esi, dword [ebx + 0x1c]
jne 0x1008a6b9
mov eax, dword [ebx + 0x2c]
sub eax, dword [ebx + 0x28]
sar eax, 3
mov dword [ebp + 0x2c], eax
mov eax, dword [ebp + 0x44]
cmp eax, 0xffffffff
je 0x1008a6bc
push 0
lea ecx, [ebp + 0x50]
push ecx
push 4
lea ecx, [ebp + 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1008a6b9
cmp dword [ebp + 0x50], 4
jne 0x1008a6b9
mov edx, dword [ebx + 0x2c]
mov eax, edx
mov ecx, dword [ebx + 0x28]
sub eax, ecx
sar eax, 3
xor ebx, ebx
imul edi, eax, 0x238
add edi, esi
adc ebx, ebx
add edi, 4
adc ebx, 0
xor esi, esi
test eax, eax
je 0x1008a345
nop dword [eax]
mov eax, dword [ecx + esi*8]
mov dword [eax + 0x20c], edi
mov dword [eax + 0x210], ebx
mov eax, dword [ebp + 0x34]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + esi*8]
add edi, dword [ecx + 0x214]
adc ebx, dword [ecx + 0x218]
test ecx, ecx
je 0x1008a6b9
mov eax, dword [ebp + 0x44]
cmp eax, 0xffffffff
je 0x1008a6bc
push 0
lea edx, [ebp + 0x50]
push edx
push 0x238
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1008a6b9
cmp dword [ebp + 0x50], 0x238
jne 0x1008a6b9
mov eax, dword [ebp + 0x34]
inc esi
mov edx, dword [eax + 0x2c]
mov ecx, dword [eax + 0x28]
mov eax, edx
sub eax, ecx
sar eax, 3
cmp esi, eax
jb 0x1008a2d0
mov dword [ebp + 0x38], vtable.WM::GMFile.0
mov dword [ebp + 0x3c], 0xffffffff
sub edx, ecx
mov byte [ebp - 4], 2
xor edi, edi
sar edx, 3
mov dword [ebp + 0x30], edi
test edx, edx
je 0x1008a670
nop dword [eax]
mov edx, dword [ecx + edi*8]
mov edi, dword [ecx + edi*8 + 4]
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x58], edi
test edi, edi
je 0x1008a38d
lea ecx, [edi + 4]
mov eax, 1
lock xadd dword [ecx], eax
test edx, edx
je 0x1008a60f
cmp dword [edx], 1
je 0x1008a60f
xor eax, eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], ax
lea esi, [edx + 4]
mov byte [ebp - 4], 4
mov ecx, esi
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x24], 7
mov word [ebp + 0x10], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008a3d0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp + 0x10]
call fcn.1001a600
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp - 0x24]
push eax
call sym.WMCommon.dll_public:_static_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_WM::GMFileName::JoinFileName_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
add esp, 0xc
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 7
call fcn.1001a5a0
mov ecx, esi
mov dword [ebp + 0x20], 0
xor eax, eax
mov dword [ebp + 0x24], 7
mov word [ebp + 0x10], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008a426
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp + 0x10]
call fcn.1001a600
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 8
push eax
push dword [ebp + 0x54]
lea eax, [ebp - 0x54]
push eax
call sym.WMCommon.dll_public:_static_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_WM::GMFileName::JoinFileName_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
add esp, 0xc
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0xa
call fcn.1001a5a0
lea eax, [ebp - 0x24]
push eax
call sym.WMCommon.dll_public:_static_bool___cdecl_WM::GMFilePathUtils::IsExistsFile_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
add esp, 4
lea ecx, [ebp - 0x3c]
test al, al
jne 0x1008a485
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
push dword [ebp - 0x44]
cmovae eax, dword [ebp - 0x54]
jmp 0x1008a493
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
push dword [ebp - 0x14]
cmovae eax, dword [ebp - 0x24]
push eax
call fcn.1001a600
push 0x80
push 3
push 1
push accept
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp + 0x38]
call sym.WMCommon.dll_public:_bool___thiscall_WM::GMFile::Create_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___unsigned_int__unsigned_int__unsigned_int__unsigned_int_
test al, al
je 0x1008a54e
push 0x1000
mov dword [ebp], vtable.WM::GMBuffer_unsigned_char_.0
mov dword [ebp + 0xc], 0
call fcn.1006e70d
mov ebx, eax
mov dword [ebp + 4], 0x1000
add esp, 4
mov dword [ebp + 8], ebx
test ebx, ebx
je 0x1008a5b9
mov ecx, dword [ebp + 0x3c]
cmp ecx, 0xffffffff
je 0x1008a5b9
push 0
lea eax, [ebp + 0x50]
mov dword [ebp + 0x50], 0
push eax
push 0x1000
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1008a5b9
mov esi, dword [ebp + 0x50]
test esi, esi
je 0x1008a4e2
mov eax, dword [ebp + 0x44]
cmp eax, 0xffffffff
je 0x1008a546
push 0
lea ecx, [ebp + 0x28]
push ecx
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1008a546
mov eax, dword [ebp + 0x28]
cmp esi, eax
jne 0x1008a546
cmp eax, dword [ebp + 0x50]
je 0x1008a4e2
lea ecx, [ebp]
call sym.WMCommon.dll_public:_void___thiscall_WM::GMSerial::destructor_void_
lea ecx, [ebp - 0x54]
call fcn.1001a5a0
lea ecx, [ebp - 0x24]
call fcn.1001a5a0
lea ecx, [ebp - 0x3c]
call fcn.1001a5a0
test edi, edi
je 0x1008a6a6
or ebx, 0xffffffff
lea eax, [edi + 4]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008a6a6
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
lea eax, [edi + 8]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008a6a6
mov edx, dword [edi]
mov ecx, edi
mov eax, dword [edx + 8]
cmp eax, fcn.1001eaf0
jne 0x1008a70d
push 1
call dword [edx]
xor bl, bl
jmp 0x1008a672
lea ecx, [ebp + 0x38]
call sym.WMCommon.dll_public_virtual:_bool___thiscall_WM::GMFile::Close_void_
lea ecx, [ebp]
call sym.WMCommon.dll_public:_void___thiscall_WM::GMSerial::destructor_void_
lea ecx, [ebp - 0x54]
call fcn.1001a5a0
lea ecx, [ebp - 0x24]
call fcn.1001a5a0
lea ecx, [ebp - 0x3c]
call fcn.1001a5a0
mov byte [ebp - 4], 2
test edi, edi
je 0x1008a653
or ebx, 0xffffffff
lea eax, [edi + 4]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008a653
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
lea eax, [edi + 8]
mov edx, ebx
lock xadd dword [eax], edx
cmp edx, 1
jmp 0x1008a63b
mov byte [ebp - 4], 2
test edi, edi
je 0x1008a653
or ebx, 0xffffffff
lea eax, [edi + 4]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008a653
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
lea eax, [edi + 8]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008a653
mov edx, dword [edi]
mov ecx, edi
mov eax, dword [edx + 8]
cmp eax, fcn.1001eaf0
jne 0x1008a706
push 1
call dword [edx]
mov eax, dword [ebp + 0x34]
mov edi, dword [ebp + 0x30]
inc edi
mov dword [ebp + 0x30], edi
mov ecx, dword [eax + 0x28]
mov eax, dword [eax + 0x2c]
sub eax, ecx
sar eax, 3
cmp edi, eax
jb 0x1008a370
mov bl, 1
mov eax, dword [ebp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x38], vtable.WM::GMFile.0
cmp eax, 0xffffffff
je 0x1008a6aa
push eax
call esi
mov ecx, dword [ebp + 0x3c]
test eax, eax
mov eax, dword [ebp + 0x44]
mov edi, 0xffffffff
cmovne ecx, edi
mov dword [ebp + 0x38], vtable.WM::GMBaseFile.0
mov dword [ebp + 0x3c], ecx
jmp 0x1008a6c7
xor bl, bl
jmp 0x1008a672
mov eax, dword [ebp + 0x44]
or edi, 0xffffffff
mov dword [ebp + 0x38], vtable.WM::GMBaseFile.0
jmp 0x1008a6c7
mov eax, dword [ebp + 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
or edi, 0xffffffff
mov dword [ebp + 0x40], vtable.WM::GMFile.0
cmp eax, 0xffffffff
je 0x1008a6e1
push eax
call esi
mov ecx, dword [ebp + 0x44]
test eax, eax
cmovne ecx, edi
mov dword [ebp + 0x44], ecx
lea ecx, [ebp + 0x58]
mov dword [ebp + 0x40], vtable.WM::GMBaseFile.0
call fcn.1001a5a0
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x48]
pop ebp
ret 0x20
call eax
jmp 0x1008a653
call eax
jmp 0x1008a6a6