Function at 0x1009b3b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x102a04b5
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x10373f78]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x1009b3e9
mov eax, dword [edi]
push 0
push 0x80000080
push 2
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x88]
lea eax, [ebp - 0x50]
mov dword [ebp - 0x88], vtable.std::_Func_impl_no_alloc_bool____cdecl___void____bool__void__.0
push eax
mov dword [ebp - 0x84], 0x10087150
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x2c], 0
call fcn.10087300
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x1009b457
mov edx, dword [ecx]
lea eax, [ebp - 0x88]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp - 0x64], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x1009b59a
cmp eax, 0xffffffff
je 0x1009b59a
push 0
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0
push ecx
push dword [ebp + 8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1009b55c
call fcn.10048fd0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.100882e0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 2
push eax
push edi
push str.Unable_to_write_file__0_._Error:__1
push 2
mov ecx, esi
call fcn.10051390
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1009b4fe
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1009b4f4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1009b604
push edx
push ecx
call fcn.1026505f
add esp, 8
xor bl, bl
mov dword [ebp - 4], 4
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x1009b526
cmp eax, 0xffffffff
je 0x1009b526
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x1009b53e
mov dword [ebp - 0x60], eax
lea edx, [ebp - 0x60]
mov eax, dword [ecx]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x1009b53e
mov esi, dword [ecx]
lea eax, [ebp - 0x50]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x1009b593
call fcn.10048fd0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.100882e0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
push edi
push str.Unable_to_flush_write_buffer_for_the_file__0_._Error:__1
jmp 0x1009b4b7
mov bl, 1
jmp 0x1009b500
call fcn.10048fd0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.100882e0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
push edi
push str.Unable_to_create_file__0_._Error:__1
push 2
mov ecx, esi
call fcn.10051390
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1009b4fe
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1009b4f4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1009b4f4
call fcn.10275373
int3