Function at 0x10014c20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov ebx, dword [ebp + 0x14]
call 0x10014ae1
pop eax
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x10014bae
mov edi, dword [ebp + 0x10]
lea esi, [ebp - 0x1c]
jmp 0x10014b18
test ebx, ebx
je 0x10014bae
mov ecx, esi
mov edx, 0xfffffff4
push dword [ebp + 0xc]
push ebx
push edi
call fcn.10014c20
add esp, 0xc
movzx eax, byte [ebp - 0x1c]
cmp eax, 4
jne 0x10014b50
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10014bb6
mov eax, ebx
sub eax, ecx
jb 0x10014bd3
add edi, ecx
mov ebx, eax
jmp 0x10014b10
mov eax, dword [eax*4 + 0x10014c0c]
add eax, dword [ebp - 0x20]
jmp eax
mov eax, dword [ebp + 8]
mov byte [eax], 4
jmp 0x10014bcb
mov esi, 0x1007c020
jmp 0x10014bc0
mov eax, dword [ebp + 8]
movsd xmm0, qword [esi]
movsd qword [eax], xmm0
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, ebx
push 0x1007c028
call fcn.100078d0
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov edi, eax
cmp dword [edx + 4], 0
je 0x10014bf8
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 8]
call fcn.10006c20
mov ecx, esi
mov edx, 4
call fcn.10006c20
push edi
call fcn.1004d8d0
nop
fild word [eax]
add byte [eax], al
jnp 0x10014c12
add byte [eax], al
adc al, 0
add byte [eax], al
add dword [eax], 0
add byte [edi], cl
pop ds
inc eax
add byte [ebp - 0x77], dl
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov edi, dword [ebp + 0xc]
mov esi, ecx
test edi, edi
je 0x10014c48
push edx
call sub.KERNEL32.dll_GetStdHandle
test eax, eax
je 0x10014c54
cmp eax, 0xffffffff
jne 0x10014c67
call sub.KERNEL32.dll_GetLastError
jmp 0x10014c59
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x10014c5f
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
push ecx
mov dword [ebp - 0x10], eax
push eax
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x10014cd3
mov ebx, dword [ebp + 0x10]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x10014cf3
cmp al, 4
jae 0x10014e3e
mov ecx, dword [ebp + 8]
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x10014d46
mov byte [ebx + eax], cl
movzx ecx, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx eax, byte [eax + 0x1007ce32]
cmp cl, al
mov dword [ebp - 0x38], eax
jae 0x10014d4c
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x10014c5f
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x28]
push edi
push dword [ebp + 8]
call fcn.10014ee0
add esp, 8
movsd xmm0, qword [ebp - 0x28]
movsd qword [esi], xmm0
jmp 0x10014c5f
cmp edi, 0x1000
mov eax, 0x1000
cmovb eax, edi
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x34]
push eax
call fcn.10008950
add esp, 4
cmp dword [ebp - 0x34], 0
je 0x10014d81
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10014d9b
cmp eax, edi
ja 0x10014e7f
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x28]
push eax
call fcn.10008950
add esp, 4
cmp dword [ebp - 0x28], 0
jne 0x10014e8d
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
jmp 0x10014d87
mov byte [ebx + 4], 0
jmp 0x10014d72
mov edi, eax
movzx eax, cl
cmp cl, 5
jae 0x10014e6e
lea ecx, [ebp - 0x34]
mov edx, ebx
push eax
call fcn.10008950
add esp, 4
cmp dword [ebp - 0x34], 0
mov byte [ebx + 4], 0
je 0x10014dbb
mov byte [esi], 2
mov dword [esi + 4], 0x1007cf84
jmp 0x10014c5f
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov ecx, esi
push edi
push eax
call fcn.10014fb0
add esp, 8
jmp 0x10014c5f
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x1007ce32]
cmp ecx, edi
jbe 0x10014e11
mov byte [ebx], al
mov byte [ebx + 4], 1
mov al, 4
mov ecx, 1
jmp 0x10014e18
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
cmp ecx, edi
mov dword [ebp - 0x3c], ecx
jne 0x10014eb4
mov ebx, edi
mov edx, dword [ebp - 0x10]
lea edi, [ebp - 0x28]
mov ecx, edi
push ebx
push eax
call fcn.10014fb0
add esp, 8
movzx eax, byte [ebp - 0x28]
cmp al, 4
jne 0x10014e22
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x48], ebx
cmp eax, ebx
mov dword [ebp - 0x40], eax
je 0x10014cc7
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x48]
push 0x1007d024
push edi
call fcn.10015370
mov al, 2
mov ecx, 0x1007cf84
mov dword [esi + 4], ecx
mov byte [esi], al
jmp 0x10014c5f
movzx ecx, byte [ebp - 0x25]
movzx edi, word [ebp - 0x27]
mov edx, dword [ebp - 0x24]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x10014c5f
mov dword [ebp - 0x28], 0x1007cfec
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 4
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x28]
mov edx, 0x1007cff4
call fcn.10007890
mov ecx, eax
mov edx, 4
push 0x1007d004
call fcn.10007fd0
mov ecx, eax
mov edx, edi
push 0x1007cf90
call fcn.10007fd0
movsd xmm0, qword [ebp - 0x24]
movsd qword [ebp - 0x48], xmm0
lea eax, [ebp - 0x48]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x1007cfa0
push 0x1007af48
push eax
call fcn.10008f10
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x3c]
push 0x1007d014
lea eax, [ebp - 0x28]
push eax
call fcn.10015370
mov esi, eax
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
push esi
call fcn.1004d8d0
nop