Function at 0x10091540
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1024b5db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x28], vtable.WM::GMFile.0
mov dword [ebp - 0x24], 0xffffffff
push 0x80
push 2
push 1
push 0x120116
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
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
je 0x10091857
mov eax, dword [ebp - 0x24]
mov dword [ebp + 8], 0
cmp eax, 0xffffffff
je 0x10091857
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp + 8]
push 0
push ecx
push 4
push str.GMUT
push eax
call esi
test eax, eax
je 0x10091857
cmp dword [ebp + 8], 4
jne 0x10091857
mov eax, dword [ebp - 0x24]
mov byte [ebp - 0x11], 2
cmp eax, 0xffffffff
je 0x10091857
push 0
lea ecx, [ebp + 8]
push ecx
push 1
lea ecx, [ebp - 0x11]
push ecx
push eax
call esi
test eax, eax
je 0x10091857
cmp dword [ebp + 8], 1
jne 0x10091857
lea edx, [ebx + 0x1a4]
lea ecx, [ebp - 0x28]
call fcn.100296e0
test al, al
je 0x10091851
lea edx, [ebx + 0x194]
lea ecx, [ebp - 0x28]
call fcn.100296e0
test al, al
je 0x10091851
push 0
push 0x1000
lea ecx, [ebp - 0x60]
call sym.WMCommon.dll_public:_void___thiscall_WM::GMSerial::constructor_unsigned_int__bool_
mov byte [ebp - 4], 1
mov eax, 0x2aaaaaab
mov ecx, dword [ebx + 0x1b8]
sub ecx, dword [ebx + 0x1b4]
imul ecx
push 4
sar edx, 2
lea ecx, [ebp - 0x60]
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
mov eax, dword [ebx + 0x1b8]
mov edi, dword [ebx + 0x1b4]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edi
cmp edi, eax
je 0x100916e0
mov eax, dword [edi + 0x10]
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push 4
push eax
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x100916a3
mov ecx, dword [edi]
mov eax, dword [edi + 0x10]
mov esi, edi
lea eax, [ecx + eax*2]
mov dword [ebp - 0x1c], eax
jb 0x100916b2
mov esi, dword [edi]
cmp esi, eax
je 0x100916d5
mov edi, dword [ebp - 0x1c]
nop dword [eax]
push 2
push esi
lea ecx, [ebp - 0x60]
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
add esi, 2
cmp esi, edi
jne 0x100916c0
mov edi, dword [ebp - 0x18]
add edi, 0x18
mov dword [ebp - 0x18], edi
cmp edi, dword [ebp - 0x20]
jne 0x10091685
mov edx, dword [ebp - 0x50]
lea ecx, [ebp - 0x28]
call fcn.100296e0
test al, al
je 0x10091701
lea edx, [ebx + 0x1c0]
lea ecx, [ebp - 0x28]
call fcn.100296e0
test al, al
jne 0x1009170e
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x10091831
push 0
push 0x1000
lea ecx, [ebp - 0x44]
call sym.WMCommon.dll_public:_void___thiscall_WM::GMSerial::constructor_unsigned_int__bool_
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
mov eax, dword [ebx + 0x1e8]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push 4
push eax
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
mov ecx, dword [ebx + 0x1e4]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
cmp eax, ecx
je 0x100917f0
nop
lea esi, [eax + 0x10]
mov eax, dword [esi + 0x10]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push 4
push eax
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x10091771
mov ecx, dword [esi]
mov eax, dword [esi + 0x10]
lea edi, [ecx + eax*2]
jb 0x1009177b
mov esi, dword [esi]
cmp esi, edi
je 0x10091792
nop
push 2
push esi
lea ecx, [ebp - 0x44]
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
add esi, 2
cmp esi, edi
jne 0x10091780
mov esi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x44]
add esi, 0x28
push 4
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x100917b6
mov ecx, dword [esi]
mov eax, dword [esi + 0x10]
lea edi, [ecx + eax*2]
jb 0x100917c0
mov esi, dword [esi]
cmp esi, edi
je 0x100917d6
push 2
push esi
lea ecx, [ebp - 0x44]
call sym.WMCommon.dll_public:_class_WM::GMSerial____thiscall_WM::GMSerial::WriteData_void_const___unsigned_int_
add esi, 2
cmp esi, edi
jne 0x100917c4
lea ecx, [ebp - 0x18]
call fcn.1001d260
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 0x1e4]
jne 0x10091750
mov edx, dword [ebp - 0x34]
lea ecx, [ebp - 0x28]
call fcn.100296e0
test al, al
jne 0x10091809
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x10091813
lea ecx, [ebp - 0x28]
call sym.WMCommon.dll_public_virtual:_bool___thiscall_WM::GMFile::Close_void_
mov bl, 1
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x44], vtable.WM::GMBuffer_unsigned_char_.0
test eax, eax
je 0x10091831
push eax
call fcn.1006e708
add esp, 4
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x60], vtable.WM::GMBuffer_unsigned_char_.0
test eax, eax
je 0x10091859
push eax
call fcn.1006e708
add esp, 4
mov dword [ebp - 0x58], 0
jmp 0x10091859
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], vtable.WM::GMFile.0
cmp eax, 0xffffffff
je 0x1009186f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4