Function at 0x100c8920
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4588
call fcn.100dee40
mov eax, dword [0x1013a00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x4544], ecx
cmp dword [ebp + 0x14], 3
je 0x100c8959
cmp dword [ebp + 0x14], 2
je 0x100c8959
cmp dword [ebp + 0x14], 1
je 0x100c8959
mov eax, 0x10000
jmp 0x100c8f02
cmp dword [ebp + 0x14], 3
jne 0x100c8a86
mov eax, dword [ebp - 0x4544]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x100c8a1a
mov edx, dword [ebp - 0x4544]
cmp dword [edx + 4], 0xffffffff
je 0x100c8992
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
push ecx
call fcn.100c7a30
add esp, 4
mov edx, dword [ebp - 0x4544]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x100c89b9
mov eax, 0x10000
jmp 0x100c8f02
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x100c89da
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
push ecx
call fcn.100c6f50
add esp, 4
mov edx, dword [ebp - 0x4544]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x100c89fd
mov edx, dword [ebp - 0x4544]
mov eax, dword [edx]
push eax
call fcn.100c6fd0
add esp, 4
jmp 0x100c89da
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
push edx
call fcn.100c7550
add esp, 4
mov eax, dword [ebp - 0x4544]
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
push edx
call fcn.100c7720
add esp, 0xc
mov dword [ebp - 0x4568], eax
cmp dword [ebp - 0x4568], 0
jle 0x100c8a4c
mov eax, 0x600
jmp 0x100c8f02
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
push ecx
call fcn.100c7a30
add esp, 4
mov edx, dword [ebp - 0x4544]
mov dword [edx + 4], 0xffffffff
cmp dword [ebp - 0x4568], 0
jne 0x100c8a7c
xor eax, eax
jmp 0x100c8f02
mov eax, 0x5000000
jmp 0x100c8f02
mov eax, dword [ebp - 0x4544]
cmp dword [eax + 4], 0xffffffff
je 0x100c8aa3
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
push edx
call fcn.100c7a30
add esp, 4
mov eax, dword [ebp - 0x4544]
mov dword [eax + 4], 0xffffffff
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 4]
jl 0x100c8aca
mov eax, 0x10000
jmp 0x100c8f02
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x10]
jge 0x100c8aeb
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
push edx
call fcn.100c6f50
add esp, 4
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
cmp edx, dword [ebp + 8]
jge 0x100c8b0e
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
push ecx
call fcn.100c6fd0
add esp, 4
jmp 0x100c8aeb
lea edx, [ebp - 0x4540]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x4544]
call fcn.100c7c90
mov ecx, dword [ebp - 0x4438]
and ecx, 0x10
je 0x100c8b7a
cmp dword [ebp + 0x14], 1
jne 0x100c8b3c
xor eax, eax
jmp 0x100c8f02
push 0x103
lea edx, [ebp - 0x414]
push edx
lea eax, [ebp - 0x453c]
push eax
call fcn.100c5ee0
add esp, 0xc
lea ecx, [ebp - 0x414]
push ecx
mov edx, dword [ebp - 0x4544]
add edx, 0x138
push edx
call fcn.100c86d0
add esp, 8
xor eax, eax
jmp 0x100c8f02
cmp dword [ebp + 0x14], 1
jne 0x100c8b8e
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4550], eax
jmp 0x100c8dbf
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x455c], ecx
mov edx, dword [ebp - 0x455c]
mov dword [ebp - 0x454c], edx
mov eax, dword [ebp - 0x454c]
movzx ecx, word [eax]
test ecx, ecx
je 0x100c8bec
mov edx, dword [ebp - 0x454c]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x100c8bcc
mov ecx, dword [ebp - 0x454c]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x100c8bdb
mov eax, dword [ebp - 0x454c]
add eax, 2
mov dword [ebp - 0x455c], eax
mov ecx, dword [ebp - 0x454c]
add ecx, 2
mov dword [ebp - 0x454c], ecx
jmp 0x100c8ba3
mov edx, dword [ebp - 0x455c]
cmp edx, dword [ebp + 0xc]
je 0x100c8d9b
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4560], eax
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x4558], ecx
mov edx, dword [ebp - 0x4558]
mov dword [ebp - 0x4584], edx
mov eax, dword [ebp - 0x4560]
mov cx, word [eax]
mov word [ebp - 0x4552], cx
mov edx, dword [ebp - 0x4558]
mov ax, word [ebp - 0x4552]
mov word [edx], ax
mov ecx, dword [ebp - 0x4560]
add ecx, 2
mov dword [ebp - 0x4560], ecx
mov edx, dword [ebp - 0x4558]
add edx, 2
mov dword [ebp - 0x4558], edx
cmp word [ebp - 0x4552], 0
jne 0x100c8c1c
mov eax, dword [ebp - 0x455c]
sub eax, dword [ebp + 0xc]
sar eax, 1
lea ecx, [eax + eax - 2]
mov dword [ebp - 0x456c], ecx
cmp dword [ebp - 0x456c], 0x208
jae 0x100c8c87
jmp 0x100c8c8c
call fcn.100c9986
xor edx, edx
mov eax, dword [ebp - 0x456c]
mov word [ebp + eax - 0x20c], dx
mov ecx, 2
imul edx, ecx, 0
movzx eax, word [ebp + edx - 0x20c]
cmp eax, 0x2f
je 0x100c8ce7
mov ecx, 2
imul edx, ecx, 0
movzx eax, word [ebp + edx - 0x20c]
cmp eax, 0x5c
je 0x100c8ce7
mov ecx, 2
shl ecx, 0
movzx edx, word [ebp + ecx - 0x20c]
cmp edx, 0x3a
je 0x100c8ce7
mov dword [ebp - 0x4570], 0
jmp 0x100c8cf1
mov dword [ebp - 0x4570], 1
mov al, byte [ebp - 0x4570]
mov byte [ebp - 0x4546], al
push 0x100fbcb0
lea ecx, [ebp - 0x20c]
push ecx
call fcn.100bce20
add esp, 8
test eax, eax
je 0x100c8d21
mov dword [ebp - 0x4574], 1
jmp 0x100c8d2b
mov dword [ebp - 0x4574], 0
push 0x100fbca8
lea edx, [ebp - 0x20c]
push edx
call fcn.100bce20
add esp, 8
test eax, eax
je 0x100c8d4f
mov dword [ebp - 0x4578], 1
jmp 0x100c8d59
mov dword [ebp - 0x4578], 0
movzx eax, byte [ebp - 0x4546]
mov ecx, dword [ebp - 0x4574]
or ecx, dword [ebp - 0x4578]
or eax, ecx
mov byte [ebp - 0x4546], al
movzx edx, byte [ebp - 0x4546]
test edx, edx
jne 0x100c8d9b
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x4544]
add ecx, 0x138
push ecx
call fcn.100c86d0
add esp, 8
push 0
mov edx, dword [ebp - 0x4438]
push edx
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4550], eax
cmp dword [ebp - 0x4550], 0xffffffff
jne 0x100c8dd2
mov eax, 0x200
jmp 0x100c8f02
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
push edx
call fcn.100c7550
add esp, 4
mov byte [ebp - 0x4545], 0
push 0x4000
lea eax, [ebp - 0x4414]
push eax
mov ecx, dword [ebp - 0x4544]
mov edx, dword [ecx]
push edx
call fcn.100c7720
add esp, 0xc
mov dword [ebp - 0x4564], eax
cmp dword [ebp - 0x4564], 0
jge 0x100c8e1f
mov byte [ebp - 0x4545], 1
jmp 0x100c8e68
cmp dword [ebp - 0x4564], 0
jne 0x100c8e2a
jmp 0x100c8e68
push 0
lea eax, [ebp - 0x4588]
push eax
mov ecx, dword [ebp - 0x4564]
push ecx
lea edx, [ebp - 0x4414]
push edx
mov eax, dword [ebp - 0x4550]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x457c], eax
cmp dword [ebp - 0x457c], 0
jne 0x100c8e66
mov byte [ebp - 0x4545], 1
jmp 0x100c8e68
jmp 0x100c8dea
mov byte [ebp - 0x4547], 0
mov ecx, dword [ebp - 0x4550]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x4580], eax
cmp dword [ebp - 0x4580], 1
jne 0x100c8e9d
movzx edx, byte [ebp - 0x4545]
test edx, edx
jne 0x100c8e9d
mov byte [ebp - 0x4547], 1
movzx eax, byte [ebp - 0x4547]
test eax, eax
je 0x100c8eca
lea ecx, [ebp - 0x4424]
push ecx
lea edx, [ebp - 0x4434]
push edx
lea eax, [ebp - 0x442c]
push eax
mov ecx, dword [ebp - 0x4550]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x100c8edd
mov edx, dword [ebp - 0x4550]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x4544]
mov ecx, dword [eax]
push ecx
call fcn.100c7a30
add esp, 4
movzx edx, byte [ebp - 0x4545]
test edx, edx
je 0x100c8f00
mov eax, 0x400
jmp 0x100c8f02
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100c928c
mov esp, ebp
pop ebp
ret 0x10