Function at 0x100404320
Capabilities:
Encode data using base64
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x148
movzx edx, byte [rcx]
mov r14, rcx
mov rax, rcx
cmp dl, 0x20
jne 0x100404355
nop dword [rax]
movzx edx, byte [rax + 1]
add rax, 1
cmp dl, 0x20
je 0x100404348
cmp dl, 0x2b
mov r13d, 4
sete dl
movzx edx, dl
add rax, rdx
mov rcx, rax
nop word [rax + rax]
movsx edx, byte [rcx]
add rcx, 1
test edx, edx
je 0x1004043c2
sub edx, 0x30
xor r13d, r13d
cmp edx, 9
jbe 0x100404370
mov rcx, r14
call fcn.1004074a0
lea rcx, str._s_is_not_a_valid_positive_integer
mov rbx, rax
call sub.msys_intl_8.dll_libintl_gettext
mov r9, rbx
xor edx, edx
xor ecx, ecx
mov r8, rax
call sub.msys_2.0.dll_error
xor eax, eax
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movabs r9, 0x1999999999999999
xor r15d, r15d
xor r12d, r12d
test r13d, r13d
jne 0x100404386
nop word [rax + rax]
movsx edx, byte [rax]
add rax, 1
test edx, edx
je 0x100404599
lea r8d, [rdx - 0x30]
cmp r12, r9
ja 0x100404433
lea rcx, [r15 + r15*4]
mov r10, r15
lea r12, [r12 + r12*4]
mov rdx, r15
shr r10, 0x3d
add rcx, rcx
add r15, r15
shr rdx, 0x3f
cmp rcx, r15
adc edx, r10d
add rcx, r8
setb r8b
add r12, r12
mov r15, rcx
movzx r8d, r8b
add edx, r8d
add r12, rdx
jae 0x1004043e0
cmp byte [0x100415010], 0
jne 0x100404688
lea r15, [rsp + 0x30]
mov r8d, 0xa
mov rdx, r14
mov rcx, r15
call qword [sym.imp.msys_gmp_10.dll___gmpz_init_set_str]
mov rdx, r15
lea rcx, str._Zd:
mov rbp, qword [sym.imp.msys_gmp_10.dll___gmp_printf]
call rbp
lea rdx, [rsp + 0x40]
mov rcx, r15
call fcn.100402330
cmp qword [rsp + 0x50], 0
je 0x1004046ad
mov rax, qword [rsp + 0x48]
xor r14d, r14d
xor edx, edx
lea r12, str.__Zd
nop dword [rax]
mov rsi, rdx
xor ebx, ebx
lea rdi, [rdx*8]
shl rsi, 4
cmp qword [rax + rdx*8], 0
je 0x1004044ce
mov rdx, qword [rsp + 0x40]
mov rcx, r12
add rdx, rsi
call rbp
mov rax, qword [rsp + 0x48]
lea edx, [rbx + 1]
mov rbx, rdx
cmp rdx, qword [rax + rdi]
jb 0x1004044b0
mov rcx, qword [rsp + 0x50]
lea edx, [r14 + 1]
mov r14, rdx
cmp rdx, rcx
jb 0x100404498
test rcx, rcx
je 0x1004046ad
mov rbx, qword [sym.imp.msys_gmp_10.dll___gmpz_clear]
xor ecx, ecx
nop dword [rax]
shl rcx, 4
add rcx, qword [rsp + 0x40]
call rbx
lea ecx, [r13 + 1]
mov r13, rcx
cmp rcx, qword [rsp + 0x50]
jb 0x1004044f8
mov rcx, qword [rsp + 0x40]
call sub.msys_2.0.dll_free
mov rcx, qword [rsp + 0x48]
call sub.msys_2.0.dll_free
mov rcx, r15
call rbx
call sub.msys_2.0.dll___getreent
mov r8, qword [rax + 0x10]
mov rcx, rax
test byte [r8 + 0x11], 0x40
je 0x100404561
mov eax, dword [r8 + 0xc]
sub eax, 1
mov dword [r8 + 0xc], eax
jns 0x100404554
cmp eax, dword [r8 + 0x28]
jl 0x100404665
mov rax, qword [r8]
lea rdx, [rax + 1]
mov qword [r8], rdx
mov byte [rax], 0xd
sub dword [r8 + 0xc], 1
jns 0x10040458a
mov edx, 0xa
call sub.msys_2.0.dll___swbuf_r
call sub.msys_2.0.dll___getreent
mov rcx, qword [rax + 0x10]
call sub.msys_2.0.dll_fflush_unlocked
mov eax, 1
jmp 0x1004043ae
mov rax, qword [r8]
lea rdx, [rax + 1]
mov qword [r8], rdx
mov byte [rax], 0xa
jmp 0x100404572
test r12, r12
js 0x100404433
cmp byte [0x100415010], 0
jne 0x1004046c8
test r12, r12
je 0x1004046b9
mov rdx, r15
mov rcx, r12
call fcn.100401e50
mov ecx, 0x3a
call fcn.100401c70
lea r8, [rsp + 0x40]
mov rdx, r15
mov rcx, r12
call fcn.100402f80
cmp byte [rsp + 0x13a], 0
je 0x100404645
lea rsi, [rsp + 0x120]
lea rdi, [rsp + 0x50]
xor ebp, ebp
nop word cs:[rax + rax]
xor ebx, ebx
cmp byte [rsi], 0
je 0x10040462e
nop word [rax + rax]
mov ecx, 0x20
add ebx, 1
call fcn.100401c70
mov rcx, qword [rdi]
xor edx, edx
call fcn.100401b80
movzx eax, byte [rsi]
cmp ebx, eax
jb 0x100404610
movzx eax, byte [rsp + 0x13a]
add ebp, 1
add rsi, 1
add rdi, 8
cmp ebp, eax
jb 0x100404600
cmp qword [rsp + 0x48], 0
jne 0x1004046ed
mov ecx, 0xa
call fcn.100401c70
mov eax, 1
jmp 0x1004043ae
mov edx, 0xd
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], rcx
call sub.msys_2.0.dll___swbuf_r
mov r8, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
jmp 0x100404561
call sub.msys_2.0.dll___getreent
mov r8d, 0x27
mov edx, 1
lea rcx, str._using_arbitrary_precision_arithmetic_
mov r9, qword [rax + 0x18]
call sub.msys_2.0.dll_fwrite
jmp 0x100404440
mov rbx, qword [sym.imp.msys_gmp_10.dll___gmpz_clear]
jmp 0x100404511
xor edx, edx
mov rcx, r15
call fcn.100401b80
jmp 0x1004045c3
call sub.msys_2.0.dll___getreent
mov r8d, 0x24
mov edx, 1
lea rcx, str._using_single_precision_arithmetic_
mov r9, qword [rax + 0x18]
call sub.msys_2.0.dll_fwrite
jmp 0x1004045af
mov ecx, 0x20
call fcn.100401c70
mov rcx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x40]
test rcx, rcx
je 0x100404713
mov rdx, r8
call fcn.100401e50
jmp 0x100404651
xor edx, edx
mov rcx, r8
call fcn.100401b80
jmp 0x100404651