Function at 0x1001a8e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push ebx
push esi
mov esi, dword [esp + 0x24]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0xffffffff
mov esi, dword [esi + 0x14]
push 0x10000
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], 0x10000
mov ebx, dword [esi + 4]
call fcn.100b8d28
mov edi, eax
add esp, 4
test edi, edi
jne 0x1001a941
mov eax, dword [esp + 0x2c]
push str.copy_buffer
push str.failed_to_allocate_memory_for__s
push 1
push dword [eax + 0x18]
call fcn.10019a50
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x18
ret
push ebp
test ebx, ebx
je 0x1001ab18
imul eax, ebx, 0x108
mov ebp, dword [esi]
sub eax, 0x108
add ebp, eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x10]
dec ebx
push eax
push 0x100f3f0c
lea eax, [ebp + 4]
mov dword [esp + 0x24], ebx
push eax
push dword [ebp]
push dword [esp + 0x40]
call fcn.10033850
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x1001ab05
mov edx, dword [esp + 0x10]
mov ecx, edx
and ecx, 0x800007ff
jns 0x1001a99f
dec ecx
or ecx, 0xfffff800
inc ecx
mov esi, 0x800
sub esi, ecx
test ecx, ecx
cmove esi, ecx
lea eax, [esi + edx]
cmp dword [esp + 0x14], eax
jae 0x1001a9d2
push eax
call fcn.100b8d28
add esp, 4
test eax, eax
je 0x1001aa9a
mov edx, dword [esp + 0x10]
mov edi, eax
lea ecx, [esi + edx]
mov dword [esp + 0x14], ecx
push edx
push edi
push ebx
call fcn.10033bf0
add esp, 0xc
push ebx
cmp eax, dword [esp + 0x14]
jne 0x1001aafd
call fcn.10032b40
mov eax, dword [esp + 0x14]
add esp, 4
test esi, esi
je 0x1001aa10
push esi
add eax, edi
push 0
push eax
call fcn.100b1050
mov eax, dword [esp + 0x1c]
add esp, 0xc
add eax, esi
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x18]
push 0
push ecx
push eax
push edi
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001aace
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x10]
jne 0x1001aace
mov eax, dword [esi + 8]
mov ecx, eax
inc eax
shl ecx, 5
add ecx, dword [esi + 0xc]
mov dword [esi + 8], eax
mov eax, dword [esi + 0x10]
shr eax, 0xb
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
cdq
and edx, 0x7ff
add eax, edx
sar eax, 0xb
mov dword [ecx + 4], eax
lea eax, [ecx + 8]
push 0x18
push dword [ebp + 0x104]
push eax
call fcn.100b9000
mov eax, dword [esp + 0x1c]
add esp, 0xc
add dword [esi + 0x10], eax
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x1001ab18
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
jmp 0x1001a950
mov eax, dword [esp + 0x30]
push str.copy_buffer
push str.failed_to_allocate_memory_for__s
push 1
push dword [eax + 0x18]
call fcn.10019a50
push ebx
call fcn.10032b40
add esp, 0x14
push edi
call fcn.100b8d0d
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
push dword [ebp + 0x104]
mov eax, dword [esp + 0x34]
push str.failed_to_append_file:__s
push 1
push dword [eax + 0x18]
call fcn.10019a50
add esp, 0x10
push edi
call fcn.100b8d0d
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
call fcn.10032b40
add esp, 4
push edi
call fcn.100b8d0d
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
push edi
call fcn.100b8d0d
add esp, 4
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret