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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1024ae6a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], vtable.WM::GMFile.0
mov dword [ebp - 0x2c], 0xffffffff
push 0x80
push 3
push 3
push accept
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
push dword [ebp + 8]
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
jne 0x1008ad6d
xor cl, cl
mov byte [ebp + 0xb], cl
jmp 0x1008b2c4
push edi
push 0x1000
mov dword [ebp - 0x40], vtable.WM::GMBuffer_unsigned_char_.0
mov dword [ebp - 0x34], 0
call fcn.1006e70d
mov edi, eax
mov dword [ebp - 0x3c], 0x1000
add esp, 4
mov dword [ebp - 0x38], edi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 0xffffffff
je 0x1008adb7
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x1008adb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
test edi, edi
je 0x1008b2ad
mov eax, dword [ebp - 0x2c]
cmp eax, 0xffffffff
je 0x1008b2ad
push 0
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push ecx
push 7
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1008b2ad
mov eax, dword [ebp - 0x10]
test eax, eax
push 1
push 0x10266230
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x1008b2ad
mov eax, dword [edi + 3]
lea ecx, [ebp - 0x40]
mov dword [ebp + 8], eax
imul eax, eax, 0x238
push eax
call fcn.10020ab0
mov esi, dword [ebp - 0x3c]
lea eax, [ebp - 0x10]
mov edi, dword [ebp - 0x38]
lea ecx, [ebp - 0x30]
push eax
push esi
push edi
call sym.WMCommon.dll_public_virtual:_bool___thiscall_WM::GMFile::Read_void___unsigned_int__unsigned_int__
test al, al
je 0x1008b2ad
cmp dword [ebp - 0x10], esi
jne 0x1008b2ad
mov esi, dword [ebp - 0x28]
add esi, 0x28
push ecx
mov dword [ebp - 0x14], esi
mov edx, dword [esi + 4]
mov ecx, dword [esi]
call fcn.100216a0
mov eax, dword [esi]
add esp, 4
cmp dword [ebp + 8], 0
mov dword [esi + 4], eax
jbe 0x1008af40
mov dword [ebp - 0x44], edi
nop dword [eax]
push 0x238
call fcn.1006e6a7
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, eax
call sym.WMCommon.dll_public:_void___thiscall_WM::GMFileItem::constructor_void_
push eax
lea ecx, [ebp - 0x24]
call fcn.10023100
mov edx, dword [ebp - 0x14]
mov esi, edi
mov byte [ebp - 4], 2
mov ecx, 0x8e
mov edi, dword [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x44]
mov ecx, dword [edx + 4]
add edi, 0x238
mov dword [ebp - 0x44], edi
cmp dword [edx + 8], ecx
je 0x1008aede
mov eax, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x20]
mov dword [ecx + 4], eax
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x1008aed8
lea ecx, [esi + 4]
mov eax, 1
lock xadd dword [ecx], eax
mov esi, dword [ebp - 0x20]
add dword [edx + 4], 8
jmp 0x1008aeed
lea eax, [ebp - 0x24]
push eax
push ecx
mov ecx, edx
call fcn.100231b0
mov esi, dword [ebp - 0x20]
mov byte [ebp - 4], 1
test esi, esi
je 0x1008af30
lea eax, [esi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008af30
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x1008af30
mov edx, dword [esi]
mov ecx, esi
mov eax, dword [edx + 8]
cmp eax, fcn.1001eaf0
jne 0x1008b2ff
push 1
call dword [edx]
sub dword [ebp + 8], 1
jne 0x1008ae70
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 0x3c], 0x1000
je 0x1008af95
push 0x1000
call fcn.1006e70d
mov edx, dword [ebp - 0x3c]
add esp, 4
mov ecx, eax
mov dword [ebp + 8], ecx
test edx, edx
je 0x1008af7b
test edi, edi
je 0x1008af88
mov eax, 0x1000
cmp edx, eax
cmovb eax, edx
push eax
push edi
push ecx
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
test edi, edi
je 0x1008af88
push edi
call fcn.1006e708
add esp, 4
mov edi, dword [ebp + 8]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], 0x1000
mov eax, dword [ebp - 0x28]
mov esi, dword [esi]
cmp esi, dword [eax + 0x2c]
je 0x1008b25e
mov edx, dword [esi]
add edx, 4
mov dword [ebp - 0x68], 0
mov ecx, edx
mov dword [ebp - 0x64], 7
xor eax, eax
mov word [ebp - 0x78], ax
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008afc1
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x78]
call fcn.1001a600
lea eax, [ebp - 0x78]
mov byte [ebp - 4], 3
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x60]
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 - 0x78]
mov byte [ebp - 4], 5
call fcn.1001a5a0
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0xb0]
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::GetDirectory_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 6
push eax
call sym.WMCommon.dll_public:_static_bool___cdecl_WM::GMFilePathUtils::IsDirectory_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
add esp, 0xc
test al, al
jne 0x1008b033
lea eax, [ebp - 0xb0]
push eax
call sym.WMCommon.dll_public:_static_bool___cdecl_WM::GMFilePathUtils::CreateDirectories_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
add esp, 4
mov ecx, dword [esi]
mov eax, dword [ecx]
cmp eax, 1
jne 0x1008b055
cmp dword [ebp - 0x4c], 8
lea eax, [ebp - 0x60]
push 0
cmovae eax, dword [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x1008b235
test eax, eax
jne 0x1008b235
mov dword [ebp - 0x1c], vtable.WM::GMFile.0
mov dword [ebp - 0x18], 0xffffffff
mov byte [ebp - 4], 7
lea eax, [ebp - 0x60]
push dword [ecx + 0x21c]
lea ecx, [ebp - 0x1c]
push 2
push 1
push 0x40000000
push eax
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 0x1008b26a
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x78]
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::GMFilePathUtils::Extension_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__
add esp, 8
push 0x102665b0
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 8
call fcn.1001a2f0
mov edx, dword [ebp - 0x68]
lea ecx, [ebp - 0x98]
cmp edx, dword [ebp - 0x88]
lea eax, [ebp - 0x78]
cmovb edx, dword [ebp - 0x88]
cmp dword [ebp - 0x84], 8
push edx
cmovae ecx, dword [ebp - 0x98]
cmp dword [ebp - 0x64], 8
push ecx
cmovae eax, dword [ebp - 0x78]
push eax
call sym.WMCommon.dll_public:_static_int___cdecl_WM::GMStringUtils::CompareNoCase_wchar_t_const___wchar_t_const___unsigned_int_
add esp, 0xc
lea ecx, [ebp - 0x98]
mov edi, eax
call fcn.1001a5a0
test edi, edi
jne 0x1008b11c
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x60]
cmp ecx, eax
je 0x1008b11c
cmp dword [ebp - 0x4c], 8
push dword [ebp - 0x50]
cmovae eax, dword [ebp - 0x60]
push eax
call fcn.1001a600
mov ecx, dword [esi]
mov eax, dword [ecx + 0x230]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0x234]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 0x228]
mov dword [ebp - 0x48], eax
mov eax, dword [ecx + 0x22c]
mov dword [ebp - 0x44], eax
mov eax, dword [ecx + 0x220]
mov dword [ebp - 0x80], eax
mov eax, dword [ecx + 0x224]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x1008b171
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x80]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ecx, dword [esi]
mov eax, dword [ecx + 0x214]
mov ecx, dword [ecx + 0x218]
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], ecx
test ecx, ecx
jne 0x1008b19d
test eax, eax
je 0x1008b225
nop
test ecx, ecx
jne 0x1008b19d
mov edi, eax
cmp eax, 0x1000
jbe 0x1008b1a2
mov edi, 0x1000
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x1008b262
mov eax, dword [ebp - 0x2c]
cmp eax, 0xffffffff
je 0x1008b262
push 0
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push edx
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1008b262
mov eax, dword [ebp - 0x10]
test eax, eax
cmp eax, edi
jne 0x1008b262
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x1008b262
push 0
lea ecx, [ebp - 0x10]
push ecx
push edi
push dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1008b262
cmp edi, dword [ebp - 0x10]
jne 0x1008b262
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
sub eax, edi
mov dword [ebp + 8], eax
sbb ecx, 0
mov dword [ebp - 0x14], ecx
test ecx, ecx
ja 0x1008b19d
jb 0x1008b225
test eax, eax
jne 0x1008b190
lea ecx, [ebp - 0x78]
call fcn.1001a5a0
lea ecx, [ebp - 0x1c]
call sym.WMCommon.dll_public_virtual:_void___thiscall_WM::GMFile::destructor_void_
lea ecx, [ebp - 0xb0]
call fcn.1001a5a0
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
call fcn.1001a5a0
mov eax, dword [ebp - 0x28]
add esi, 8
cmp esi, dword [eax + 0x2c]
jne 0x1008afa3
mov edi, dword [ebp - 0x38]
mov cl, 1
jmp 0x1008b2af
lea ecx, [ebp - 0x78]
call fcn.1001a5a0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], vtable.WM::GMFile.0
cmp eax, 0xffffffff
je 0x1008b290
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
test eax, eax
mov eax, 0xffffffff
cmovne ecx, eax
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0x1c], vtable.WM::GMBaseFile.0
call fcn.1001a5a0
lea ecx, [ebp - 0x60]
call fcn.1001a5a0
mov edi, dword [ebp - 0x38]
xor cl, cl
mov byte [ebp + 0xb], cl
pop esi
test edi, edi
je 0x1008b2c3
push edi
call fcn.1006e708
mov cl, byte [ebp + 0xb]
add esp, 4
pop edi
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], vtable.WM::GMFile.0
cmp eax, 0xffffffff
je 0x1008b2ed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov al, cl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
call eax
jmp 0x1008af30