Function at 0x1017152e
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xfc
mov eax, dword [0x10285008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
or ebx, 0xffffffff
mov dword [ebp - 0xfc], edx
push esi
or dword [eax], ebx
xor esi, esi
cmp dword [ebp + 8], 0x10
push edi
mov edi, ecx
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xec], ebx
jbe 0x10171571
mov esi, 0x80070057
jmp 0x101715bb
push 0
push 0x4000000
push 2
push 0
push 7
push 0xc0000000
push edi
call dword [0x102a9c60]
mov ebx, eax
mov dword [ebp - 0xec], ebx
cmp ebx, 0xffffffff
jne 0x101715bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
push 0x1008c2e8
call fcn.100d3aab
add esp, 0xc
test esi, esi
jle 0x101715bb
movzx esi, si
or esi, 0x80070000
xor eax, eax
mov byte [ebp - 0xe8], 0
lea edi, [ebp - 0xe7]
mov dword [ebp - 0xf4], 1
stosd dword es:[edi], eax
push 0xd4
push 0
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0xe0]
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0xf0], 0
add esp, 0xc
test esi, esi
js 0x10171634
xor edi, edi
cmp dword [ebp + 8], edi
jbe 0x10171655
mov eax, dword [ebp - 0xf4]
mov ebx, dword [ebp - 0xfc]
cmp eax, 1
jne 0x10171625
mov ecx, dword [ebx + edi*4]
lea edx, [ebp - 0xe8]
call fcn.101712d8
inc edi
cmp edi, dword [ebp + 8]
jb 0x1017160c
mov ebx, dword [ebp - 0xec]
test eax, eax
jne 0x10171655
mov esi, 0x80004005
cmp ebx, 0xffffffff
je 0x10171640
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10236010
mov esp, ebp
pop ebp
ret 8
mov eax, dword [0x1008c344]
mov edi, 0x94
mov dword [ebp - 0xe8], eax
mov eax, dword [0x1008c348]
mov dword [ebp - 0xe4], eax
mov eax, dword [ebp - 0x10]
shl eax, 2
mov dword [ebp - 0xec], eax
add eax, 0x94
push 0
mov dword [ebp - 0xd8], eax
lea eax, [ebp - 0xf0]
push eax
push edi
lea eax, [ebp - 0xe8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x101716cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1008c350
call fcn.100d3aab
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x101716e7
movzx esi, si
or esi, 0x80070000
jmp 0x101716e5
cmp dword [ebp - 0xf0], edi
je 0x101716e5
push 0x1008c3a8
call fcn.100d3aab
pop ecx
mov esi, 0x8000ffff
test esi, esi
js 0x10171634
mov eax, dword [ebp - 0x10]
xor ecx, ecx
push 0x1008c6fc
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.102364fd
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x10171726
push 0x1008c420
call fcn.100d3aab
pop ecx
mov esi, 0x8007000e
jmp 0x10171634
xor eax, eax
cmp dword [ebp - 0x10], eax
jbe 0x10171736
mov dword [edi + eax*4], eax
inc eax
cmp eax, dword [ebp - 0x10]
jb 0x1017172d
push 0
lea eax, [ebp - 0xf0]
push eax
push dword [ebp - 0xec]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1017177b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1008c470
call fcn.100d3aab
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10171799
movzx esi, si
or esi, 0x80070000
jmp 0x10171799
mov eax, dword [ebp - 0xec]
cmp dword [ebp - 0xf0], eax
je 0x10171799
push 0x1008c4c8
call fcn.100d3aab
pop ecx
mov esi, 0x8000ffff
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
pop ecx
test esi, esi
js 0x10171634
lea edx, [ebp - 0xe8]
mov ecx, ebx
call fcn.101713ba
mov esi, eax
test esi, esi
js 0x10171634
mov eax, dword [ebp - 0xf8]
mov dword [eax], ebx
jmp 0x10171640