Function at 0x10001bb0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1000c088
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x1c], esi
mov eax, dword [esi + 0xc]
lea ebp, [esi + 8]
test eax, eax
mov dword [esp + 0x14], ebp
je 0x10001bec
mov ecx, dword [ebp + 8]
sub ecx, eax
test ecx, 0xfffffffc
jne 0x10001c08
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x10001e89
mov edx, dword [esi + 0x20]
sub edx, eax
test edx, 0xfffffffc
je 0x10001e89
mov eax, dword [0x1000f07c]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push eax
mov dword [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10001c70
mov eax, dword [esp + 0xc]
mov edx, dword [0x1000f030]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x10001e89
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10001e89
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
jmp 0x10001e81
push ebx
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
xor edx, edx
mov dword [esp + 0x14], edx
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x10001d3c
mov ebp, dword [ebp + 8]
sub ebp, ecx
sar ebp, 2
cmp edx, ebp
jae 0x10001d3c
mov ecx, dword [esi + 0xc]
lea esi, [ecx + edx*4]
mov ecx, dword [ecx + edx*4]
cmp eax, ecx
je 0x10001cfe
mov edx, dword [eax - 0xc]
test edx, edx
jge 0x10001cca
mov edx, dword [0x1000f030]
add eax, 0xfffffff4
cmp eax, edx
jne 0x10001cd1
mov eax, dword [ecx - 0xc]
test eax, eax
jge 0x10001ce1
mov edx, dword [ecx - 8]
push ecx
push edx
lea ecx, [esp + 0x18]
call fcn.10002de0
jmp 0x10001cfa
lea ecx, [esp + 0x10]
call fcn.10002f40
mov esi, dword [esi]
mov dword [esp + 0x10], esi
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x10001d26
lea edx, [esp + 0x1c]
push 0
push edx
push ecx
push eax
push edi
call ebx
lea eax, [esp + 0x1c]
push 0
push eax
push 2
push 0x1000f088
push edi
call ebx
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
inc edx
mov dword [esp + 0x14], edx
jmp 0x10001c8e
mov dword [esp + 0x14], 0
lea ebp, [esi + 0x18]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x10001df9
mov edx, dword [ebp + 8]
sub edx, ecx
mov ecx, dword [esp + 0x14]
sar edx, 2
cmp ecx, edx
jae 0x10001df9
mov ecx, dword [esi + 0x1c]
mov edx, dword [esp + 0x14]
lea esi, [ecx + edx*4]
mov ecx, dword [ecx + edx*4]
cmp eax, ecx
je 0x10001dbf
mov edx, dword [eax - 0xc]
test edx, edx
jge 0x10001d8b
mov edx, dword [0x1000f030]
add eax, 0xfffffff4
cmp eax, edx
jne 0x10001d92
mov eax, dword [ecx - 0xc]
test eax, eax
jge 0x10001da2
mov eax, dword [ecx - 8]
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.10002de0
jmp 0x10001dbb
lea ecx, [esp + 0x10]
call fcn.10002f40
mov esi, dword [esi]
mov dword [esp + 0x10], esi
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x10001de7
lea edx, [esp + 0x1c]
push 0
push edx
push ecx
push eax
push edi
call ebx
lea eax, [esp + 0x1c]
push 0
push eax
push 2
push 0x1000f088
push edi
call ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x14], ecx
jmp 0x10001d47
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 4]
mov edi, ebx
cmp edi, ebx
je 0x10001e26
push edi
mov ecx, esi
call fcn.10002750
add edi, 4
add esi, 4
cmp edi, ebx
jne 0x10001e10
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 8]
push edx
push esi
call fcn.100021f0
mov eax, dword [esp + 0x18]
mov dword [eax + 8], esi
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 8]
push ecx
push eax
push eax
call fcn.10002530
mov ecx, dword [ebp + 8]
add esp, 0xc
mov esi, eax
push ecx
push esi
mov ecx, ebp
call fcn.100021f0
mov eax, dword [esp + 0x10]
mov dword [ebp + 8], esi
mov ecx, dword [0x1000f030]
pop ebx
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x10001e89
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10001e89
mov eax, dword [esp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.1000bdea
add esp, 4
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x20
ret