Function at 0x100bfc80
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push ebp
mov ebp, dword [esp + 0x24]
test ebp, ebp
jne 0x100bfc93
xor eax, eax
pop ebp
add esp, 0x18
ret
push ebp
call fcn.100c27f0
add esp, 4
test eax, eax
jne 0x100bfca5
pop ebp
add esp, 0x18
ret
mov eax, dword [ebp]
push ebx
mov ebx, 1
push esi
cmp eax, ebx
push edi
mov dword [esp + 0x10], 0
jne 0x100bfd1f
mov eax, dword [esp + 0x2c]
mov ebp, dword [ebp + 4]
cmp eax, ebx
mov dword [esp + 0x10], ebx
mov edi, ebx
jle 0x100bfe75
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x3c]
mov eax, dword [esi]
lea edx, [esp + 0x20]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push ebp
call ebx
test eax, eax
je 0x100bfd0b
mov eax, dword [esp + 0x2c]
inc edi
add esi, 0xc
cmp edi, eax
jl 0x100bfcdb
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x18
ret
pop edi
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
pop esi
pop ebx
pop ebp
add esp, 0x18
ret
cmp eax, 2
jne 0x100bfd62
mov eax, dword [esp + 0x2c]
mov ebp, dword [ebp + 4]
cmp eax, ebx
mov dword [esp + 0x10], ebx
jle 0x100bfe75
lea esi, [esp + 0x3c]
lea edi, [eax - 1]
mov eax, dword [esi]
mov edx, dword [ebp]
mov ecx, dword [eax + 4]
add eax, 8
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x24]
add esi, 0xc
dec edi
jne 0x100bfd3e
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x18
ret
cmp eax, 3
jne 0x100bfe75
mov edi, dword [esp + 0x2c]
mov edx, dword [ebp + 4]
xor ecx, ecx
cmp edi, ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ebx
jle 0x100bfdb2
lea edx, [esp + 0x3c]
lea esi, [edi - 1]
mov eax, dword [edx]
mov eax, dword [eax + 4]
test eax, eax
jle 0x100bfd96
cmp ecx, eax
jg 0x100bfd96
mov ecx, eax
add edx, 0xc
dec esi
jne 0x100bfd87
test ecx, ecx
jle 0x100bfdb2
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x14], eax
mov ebx, 1
cmp edi, ebx
mov dword [esp + 0x20], ebx
jle 0x100bfe68
lea ecx, [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
test ebx, ebx
jle 0x100bfe35
mov edi, dword [esp + 0x14]
mov ecx, ebx
lea esi, [eax + 8]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 1
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x24]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp + 0x130]
mov esi, dword [esp + 0x14]
lea edx, [ebp + 0xc]
push edx
lea edx, [ebp + 0x2c]
push ecx
push edx
push ebx
push esi
push eax
call fcn.100c1bc0
mov ecx, dword [esp + 0x34]
add esp, 0x18
lea eax, [esp + 0x24]
push 0
push eax
push ebx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100bfe53
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
inc eax
add edx, 0xc
cmp eax, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edx
jl 0x100bfdc6
jmp 0x100bfe68
mov edx, dword [esp + 0x14]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x18
ret