Function at 0x416ca6
Capabilities:
Write file on windows

Disassembly:
push 0x98
mov eax, 0x6795f6
call fcn.005b8597
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
push 0x69e2e4
push dword [ebp + 8]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xa4], edi
mov bl, 1
call fcn.005bb6b2
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp - 0xa0], ecx
test ecx, ecx
jne 0x416d21
cmp dword [ebp - 0x98], eax
je 0x416d1a
lea eax, [ebp - 0xa4]
push eax
call fcn.00413b9e
pop ecx
mov ecx, dword [ebp - 0x98]
and dword [ebp - 4], 0
push eax
call fcn.0040191c
mov ecx, dword [ebp - 0xa4]
add ecx, 0xfffffff0
call fcn.0040124d
xor al, al
jmp 0x417020
test edi, edi
je 0x416d2f
mov eax, dword [edi]
mov dword [ebp - 0x9c], eax
jmp 0x416d36
and dword [ebp - 0x9c], 0
xor eax, eax
test byte [ebp - 0x9c], 1
mov byte [ebp - 0x24], 0
lea edi, [ebp - 0x23]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esi]
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x8c], eax
je 0x416e73
push ecx
push 1
lea eax, [ebp - 0x90]
push 2
push eax
mov word [ebp - 0x90], 0xfeff
call fcn.005bbacc
add esp, 0x10
cmp eax, 1
jne 0x417000
lea eax, [ebp - 0x24]
push str.UTF_16LE_BOM_
push eax
call fcn.005ba500
xor esi, esi
pop ecx
pop ecx
cmp dword [ebp - 0x8c], esi
je 0x416e05
push dword [ebp - 0x8c]
push edi
push esi
call fcn.005bb82b
mov esi, eax
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b70fc
push dword [ebp - 0x8c]
mov dword [ebp - 0x94], eax
push edi
push eax
call fcn.005bb82b
push dword [ebp - 0xa0]
lea eax, [esi + esi]
push 1
push eax
push dword [ebp - 0x94]
call fcn.005bbacc
push dword [ebp - 0x94]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
inc bl
call fcn.004b70f1
add esp, 0x30
push esi
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
push str._d_bytes_to__s_d_wide_chars
push eax
call fcn.005bac6b
mov esi, dword [ebp - 0x98]
add esp, 0x14
test esi, esi
je 0x416e3c
lea eax, [ebp - 0x88]
push eax
mov ecx, esi
call fcn.0040196c
test bl, bl
jne 0x417000
test esi, esi
je 0x417000
lea eax, [ebp - 0x94]
push eax
call fcn.00413b9e
pop ecx
push eax
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.0040191c
mov ecx, dword [ebp - 0x94]
jmp 0x416ff8
test byte [ebp - 0x9c], 4
je 0x416eb5
push ecx
push 1
lea eax, [ebp - 0x90]
push 3
push eax
mov word [ebp - 0x90], 0xbbef
mov byte [ebp - 0x8e], 0xbf
call fcn.005bbacc
add esp, 0x10
cmp eax, 1
jne 0x416eb5
lea eax, [ebp - 0x24]
push str.UTF_8_BOM_
push eax
call fcn.005ba500
pop ecx
pop ecx
cmp dword [ebp - 0x8c], 0
je 0x416f98
mov eax, dword [esi]
sub eax, 0x10
push eax
call fcn.0040149c
lea edi, [eax + 0x10]
mov dword [ebp - 0x94], edi
mov ecx, dword [esi]
mov eax, esp
mov dword [eax], ecx
lea eax, [ebp - 0x90]
mov dword [ebp - 0x8c], esp
push eax
mov dword [ebp - 4], 2
call fcn.00416833
pop ecx
pop ecx
mov eax, dword [ebp - 0x90]
cmp dword [eax - 0xc], 0
mov byte [ebp - 4], 3
je 0x416f1b
push 5
push 0x69e280
push eax
call fcn.005ba388
add esp, 0xc
test eax, eax
jne 0x416f5a
push ecx
mov ecx, dword [esi]
mov eax, esp
mov dword [ebp - 0x8c], esp
mov dword [eax], ecx
lea eax, [ebp - 0x8c]
push eax
call fcn.00412fce
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 4
call fcn.0040191c
mov ecx, dword [ebp - 0x8c]
add ecx, 0xfffffff0
call fcn.0040124d
mov edi, dword [ebp - 0x94]
push dword [ebp - 0xa0]
mov eax, dword [edi - 0xc]
push 1
push eax
push edi
mov dword [ebp - 0x8c], eax
call fcn.005bbacc
mov ecx, dword [ebp - 0x90]
add esp, 0x10
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
add ecx, 0xfffffff0
inc bl
call fcn.0040124d
or dword [ebp - 4], 0xffffffff
lea ecx, [edi - 0x10]
call fcn.0040124d
push dword [ebp - 0x8c]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x88]
push str._s_d_bytes
push eax
call fcn.005bac6b
mov esi, dword [ebp - 0x98]
add esp, 0x10
test esi, esi
je 0x416fce
lea eax, [ebp - 0x88]
push eax
mov ecx, esi
call fcn.0040196c
test bl, bl
jne 0x417000
test esi, esi
je 0x417000
lea eax, [ebp - 0x98]
push eax
call fcn.00413b9e
pop ecx
push eax
mov ecx, esi
mov dword [ebp - 4], 5
call fcn.0040191c
mov ecx, dword [ebp - 0x98]
add ecx, 0xfffffff0
call fcn.0040124d
push dword [ebp - 0xa0]
call fcn.005bad9b
mov eax, dword [ebp - 0xa4]
pop ecx
test eax, eax
je 0x41701e
mov ecx, dword [ebp - 0x9c]
mov dword [eax], ecx
mov al, bl
call fcn.005b861a
ret