Function at 0x10c7dfe
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x458
mov eax, dword [0x10de03c]
mov ecx, dword [ebp + 0xc]
and dword [ebp - 0x43c], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0x10]
mov edx, dword [ebx + 0x274]
and dword [ebp - 0x450], 0
mov dword [ebp - 0x444], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x424], edx
push edi
mov edi, dword [ebp + 0x10]
mov edx, dword [edi]
and dword [edi], 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x428], edx
mov dword [eax], 1
mov edx, dword [esi]
mov edx, dword [edx + 4]
mov dword [ebp - 0x42c], edx
mov edx, dword [ebp - 0x424]
test byte [edx + 0x84], 0x10
mov dword [ebp - 0x438], esi
mov dword [ebp - 0x420], ecx
mov dword [ebp - 0x454], edi
mov dword [ebp - 0x430], eax
je 0x10c7eba
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0x42c]
push 6
push 0
push dword [eax + 0x14]
call fcn.01084401
mov ecx, dword [ebp - 0x420]
test ax, ax
mov eax, dword [ebp - 0x430]
je 0x10c7eba
and dword [ebp - 0x42c], 0
cmp dword [ebp - 0x42c], 0
jne 0x10c7ecf
mov dword [ebp - 0x440], 0x100205c
jmp 0x10c7f05
mov edx, dword [esi + 0x14]
mov dl, byte [edx + 0x2a]
cmp dl, 1
jne 0x10c7eeb
mov edx, dword [ebp - 0x42c]
mov edx, dword [edx + 0x5c]
mov edx, dword [edx + 0x58]
mov edx, dword [edx + 8]
jmp 0x10c7eff
cmp dl, 3
jne 0x10c7f05
mov edx, dword [ebp - 0x42c]
mov edx, dword [edx + 0x5c]
mov edx, dword [edx + 0x58]
mov edx, dword [edx + 0x10]
mov dword [ebp - 0x440], edx
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
test edx, edx
je 0x10c7fce
cmp edx, 0x42444d44
je 0x10c7f2b
cmp edx, 0x474c4f44
je 0x10c7f2b
mov ax, 0xfeb1
jmp 0x10c7fbf
mov eax, dword [ebx]
test eax, eax
je 0x10c7f40
cmp eax, 0xffffffff
je 0x10c7f40
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
and dword [ebx + 0x238], 0
and dword [ebx + 0x23c], 0
mov dword [ebx + 8], ecx
mov ecx, dword [eax + 8]
mov dword [ebx + 0x230], ecx
mov eax, dword [eax + 0xc]
mov dword [ebx + 0x234], eax
mov eax, dword [edi]
add dword [ebx + 0x238], eax
mov eax, dword [ebx + 0x238]
adc dword [ebx + 0x23c], 0
cmp eax, dword [ebx + 0x230]
jne 0x10c7fb8
mov eax, dword [ebx + 0x23c]
cmp eax, dword [ebx + 0x234]
jne 0x10c7fb8
mov eax, dword [ebp - 0x444]
test eax, eax
je 0x10c7fa3
mov word [eax + 6], 1
mov eax, dword [ebx]
test eax, eax
je 0x10c7fb8
cmp eax, 0xffffffff
je 0x10c7fb8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
mov ax, word [ebp - 0x43c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01075aef
leave
ret 0x14
mov edx, dword [ebx + 0x238]
or edx, dword [ebx + 0x23c]
jne 0x10c82d6
mov edx, dword [ecx]
test edx, edx
jbe 0x10c82d6
push 4
pop esi
cmp dword [ebp - 0x428], esi
jae 0x10c7ffc
mov dword [eax], esi
jmp 0x10c7f68
add edx, 4
cmp edx, dword [ebp - 0x428]
jbe 0x10c8018
mov cx, word [ecx]
add cx, 4
movzx ecx, cx
mov dword [eax], ecx
jmp 0x10c7f68
mov ax, word [ecx]
add ax, 4
movzx eax, ax
mov dword [edi], eax
mov dword [ebp - 0x448], 1
lea eax, [ecx + 4]
jmp 0x10c8041
cmp cx, 0x5c
jne 0x10c803f
mov dword [ebp - 0x430], eax
inc eax
inc eax
mov cx, word [eax]
test cx, cx
jne 0x10c8033
mov esi, dword [ebp - 0x430]
test esi, esi
je 0x10c8109
mov eax, dword [ebp - 0x424]
test byte [eax + 0x84], 0x10
je 0x10c8109
mov edx, esi
call fcn.010c7b50
mov ecx, eax
shr ecx, 2
lea edi, [ebp - 0x41c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x438]
mov eax, dword [esi]
xor edi, edi
push edi
push edi
lea ecx, [ebp - 0x448]
push ecx
lea ecx, [ebp - 0x41a]
push ecx
push dword [eax + 0xc]
push eax
call fcn.010b51f9
test ax, ax
je 0x10c80b6
or ax, 0xffff
jmp 0x10c7fbf
push edi
push 0xa000080
push 2
push edi
push edi
push 0x40000000
push dword [ebp - 0x448]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebx], eax
jne 0x10c80fd
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1012e44
push dword [ebp - 0x440]
push edi
push dword [esi]
call fcn.010893a7
mov dword [ebp - 0x43c], 0xfffffe40
push dword [esi]
call fcn.010b4b1b
jmp 0x10c82a3
mov edx, esi
call fcn.010c7b50
mov ecx, eax
shr ecx, 2
lea edi, [ebp - 0x41c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x420]
add esi, 4
mov edx, esi
call fcn.010c7b50
mov ecx, dword [ebp - 0x420]
shr eax, 1
lea eax, [ecx + eax*2 + 4]
mov ax, word [eax]
mov word [ebp - 0x430], ax
mov eax, dword [ebx + 8]
cmp eax, 0x474c4f44
jne 0x10c8173
mov eax, dword [ebp - 0x444]
movsx eax, word [eax + 0xa]
push eax
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebp - 0x438]
call fcn.010c7b7d
jmp 0x10c818d
cmp eax, 0x42444d44
jne 0x10c818d
mov eax, dword [ebp - 0x444]
mov dword [eax + 0x1c], 0x7fffffff
mov word [eax + 0xa], 1
mov edx, esi
call fcn.010c7b50
push dword [ebp - 0x430]
mov ecx, eax
shr ecx, 2
lea edi, [ebp - 0x41c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x41c]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x438]
push eax
push edi
call fcn.010c7c90
mov esi, eax
test esi, esi
mov dword [ebp - 0x430], esi
jne 0x10c81e1
and dword [ebp - 0x448], esi
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x430], eax
mov esi, eax
push 0x24
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x10c81ff
mov word [eax], 0x3a
dec eax
dec eax
mov dword [ebp - 0x424], eax
jmp 0x10c8207
mov dword [ebp - 0x424], esi
mov eax, esi
push eax
push dword [edi]
call fcn.010b93c8
mov edx, esi
call fcn.010c7b50
mov ecx, eax
shr ecx, 2
mov dword [ebx + 0x18], eax
lea edi, [ebx + 0x1c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x424]
xor esi, esi
push esi
push 0xa000080
push 2
push esi
push esi
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebx], eax
jne 0x10c827a
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x438]
push 0x1012e44
push dword [ebp - 0x440]
push esi
push dword [eax]
call fcn.010893a7
mov dword [ebp - 0x43c], 0xfffffe40
cmp edi, esi
je 0x10c828b
cmp word [edi + 2], 0x3a
jne 0x10c828b
mov word [edi + 2], 0x24
cmp word [ebp - 0x448], si
je 0x10c82a1
push dword [ebp - 0x430]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor edi, edi
mov eax, dword [ebp - 0x454]
mov eax, dword [eax]
sub dword [ebp - 0x428], eax
add dword [ebp - 0x420], eax
cmp word [ebp - 0x43c], di
mov edi, dword [ebp - 0x454]
jne 0x10c7f68
mov esi, dword [ebp - 0x438]
mov ecx, dword [ebp - 0x420]
mov eax, dword [ebp - 0x428]
test eax, eax
je 0x10c7f68
mov edx, dword [ebx + 0x230]
and dword [ebp - 0x454], 0
mov dword [ebp - 0x44c], edx
mov edx, dword [ebx + 0x238]
add eax, edx
mov edx, dword [ebx + 0x23c]
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x454]
adc eax, edx
cmp eax, dword [ebx + 0x234]
jb 0x10c8333
mov eax, dword [ebp - 0x44c]
ja 0x10c832b
cmp dword [ebp - 0x434], eax
jbe 0x10c8333
sub eax, dword [ebx + 0x238]
jmp 0x10c8339
mov eax, dword [ebp - 0x428]
push 0
lea edx, [ebp - 0x450]
push edx
push eax
push ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10c835d
mov eax, dword [ebp - 0x450]
add dword [edi], eax
jmp 0x10c7f68
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
je 0x10c8396
cmp eax, 0x27
je 0x10c8396
push 0x1007788
push eax
push 0x10121bc
push dword [ebp - 0x440]
push 0
push dword [esi]
call fcn.010893a7
mov dword [ebp - 0x43c], 0xfffffe40
jmp 0x10c7f68
mov ax, 0xfe06
jmp 0x10c7fbf