Function at 0x140046e10
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rax, qword [0x1400f18d0]
mov rdi, rax
mov rcx, qword [rax + 0x58]
test rcx, rcx
je 0x140046e53
cmp byte [rax + 1], 0
je 0x140046e53
mov byte [rcx + 0x18], 0
mov rcx, qword [rax + 0x58]
call fcn.1400695c0
mov rax, qword [0x1400f18d0]
xor r12d, r12d
mov qword [rdi + 0x58], r12
mov rcx, qword [rdi + 0x3d98]
test rcx, rcx
je 0x140046e8c
mov qword [rdi + 0x3d90], r12
test rax, rax
je 0x140046e78
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3d98], r12
mov rax, qword [0x1400f18d0]
cmp byte [rdi], r12b
je 0x140047678
cmp byte [rdi + 0x5d88], r12b
je 0x140046ef6
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140046ef6
mov dword [rax + 0x5d8c], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.14005c940
mov rsi, rax
lea rdx, [0x1400d1a0c]
mov rcx, rbx
call fcn.140043c50
mov rbx, rax
test rax, rax
je 0x140046ef6
mov r9, rax
mov r8, qword [rsp + 0x50]
mov edx, 1
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.14005eec0
mov esi, r12d
cmp dword [rdi + 0x5d48], r12d
jle 0x140046f52
mov rbp, r12
nop word [rax + rax]
mov rax, qword [rdi + 0x5d50]
mov rbx, qword [rax + rbp + 8]
test rbx, rbx
je 0x140046f44
mov rcx, rbx
call fcn.1400607c0
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140046f3b
dec dword [rax + 0xfc]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
add rbp, 0x10
cmp esi, dword [rdi + 0x5d48]
jl 0x140046f10
mov ebx, r12d
cmp dword [rdi + 0x5dd0], r12d
jle 0x140046f91
mov rsi, r12
mov rcx, qword [rdi + 0x5dd8]
cmp dword [rsi + rcx + 4], 6
jne 0x140046f83
mov rax, qword [rsi + rcx + 0x10]
movsxd rdx, ebx
shl rdx, 5
add rdx, rcx
mov rcx, rdi
call rax
inc ebx
add rsi, 0x20
cmp ebx, dword [rdi + 0x5dd0]
jl 0x140046f61
mov esi, r12d
cmp dword [rdi + 0x3f98], r12d
jle 0x140046fe1
mov r14, r12
mov rax, qword [rdi + 0x3fa0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140046fd3
mov rcx, rbx
call fcn.140047c10
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140046fca
dec dword [rax + 0xfc]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3f98]
jl 0x140046fa0
mov rcx, qword [rdi + 0x3fa0]
test rcx, rcx
je 0x140047013
mov qword [rdi + 0x3f98], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047006
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3fa0], r12
mov rcx, qword [rdi + 0x3fb0]
test rcx, rcx
je 0x140047045
mov qword [rdi + 0x3fa8], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047038
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3fb0], r12
mov rcx, qword [rdi + 0x3fc0]
test rcx, rcx
je 0x140047077
mov qword [rdi + 0x3fb8], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004706a
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3fc0], r12
mov qword [rdi + 0x3ff8], r12
mov rcx, qword [rdi + 0x3fd0]
test rcx, rcx
je 0x1400470b0
mov qword [rdi + 0x3fc8], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400470a3
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3fd0], r12
mov rcx, qword [rdi + 0x3fe0]
test rcx, rcx
je 0x1400470e2
mov qword [rdi + 0x3fd8], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400470d5
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3fe0], r12
mov qword [rdi + 0x4a48], r12
mov qword [rdi + 0x4008], r12
mov qword [rdi + 0x4000], r12
mov qword [rdi + 0x4090], r12
mov qword [rdi + 0x4078], r12
mov qword [rdi + 0x4010], r12
lea rcx, [rdi + 0x4730]
call fcn.140041e30
mov rcx, qword [rdi + 0x4968]
test rcx, rcx
je 0x14004714a
mov qword [rdi + 0x4960], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004713d
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4968], r12
mov rcx, qword [rdi + 0x4978]
test rcx, rcx
je 0x14004717c
mov qword [rdi + 0x4970], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004716f
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4978], r12
mov rcx, qword [rdi + 0x4988]
test rcx, rcx
je 0x1400471ae
mov qword [rdi + 0x4980], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400471a1
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4988], r12
mov rcx, qword [rdi + 0x49c8]
test rcx, rcx
je 0x1400471e0
mov qword [rdi + 0x49c0], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400471d3
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x49c8], r12
mov rcx, qword [rdi + 0x49d8]
test rcx, rcx
je 0x140047212
mov qword [rdi + 0x49d0], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047205
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x49d8], r12
mov qword [rdi + 0x4a10], r12
mov qword [rdi + 0x4a08], r12
mov qword [rdi + 0x4a00], r12
mov ebx, r12d
cmp dword [rdi + 0x49e8], r12d
jle 0x14004725e
mov rsi, r12
nop word [rax + rax]
mov rcx, qword [rdi + 0x49f0]
mov rcx, qword [rcx + rsi]
call fcn.140069710
inc ebx
lea rsi, [rsi + 8]
cmp ebx, dword [rdi + 0x49e8]
jl 0x140047240
mov rcx, qword [rdi + 0x49f0]
test rcx, rcx
je 0x140047290
mov qword [rdi + 0x49e8], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047283
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x49f0], r12
lea rcx, [rdi + 0x4d18]
call fcn.140068520
mov rcx, qword [rdi + 0x4d48]
test rcx, rcx
je 0x1400472ce
mov qword [rdi + 0x4d40], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400472c1
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4d48], r12
mov rcx, qword [rdi + 0x4d58]
test rcx, rcx
je 0x140047300
mov qword [rdi + 0x4d50], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400472f3
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4d58], r12
mov ebx, r12d
cmp dword [rdi + 0x4c98], r12d
jle 0x140047348
mov rsi, r12
nop
mov rax, qword [rdi + 0x4ca0]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x14004733a
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047333
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4c98]
jl 0x140047310
mov rcx, qword [rdi + 0x4ca0]
test rcx, rcx
je 0x14004737a
mov qword [rdi + 0x4c98], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004736d
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4ca0], r12
lea rcx, [rdi + 0x4cc8]
call fcn.1400686a0
mov esi, r12d
cmp dword [rdi + 0x4cb8], r12d
jle 0x1400473e5
mov rbp, r12
nop word [rax + rax]
mov rbx, qword [rdi + 0x4cc0]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140074fa0
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x1400473d7
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400473d0
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4cb8]
jl 0x1400473a0
mov rcx, qword [rdi + 0x4cc0]
test rcx, rcx
je 0x140047417
mov qword [rdi + 0x4cb8], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004740a
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4cc0], r12
mov rcx, qword [rdi + 0x4d08]
test rcx, rcx
je 0x140047449
mov qword [rdi + 0x4d00], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004743c
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4d08], r12
mov rcx, qword [rdi + 0x5d08]
test rcx, rcx
je 0x14004747b
mov qword [rdi + 0x5d00], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004746e
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5d08], r12
mov rcx, qword [rdi + 0x5d18]
test rcx, rcx
je 0x1400474ad
mov qword [rdi + 0x5d10], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400474a0
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5d18], r12
mov rcx, qword [rdi + 0x4d98]
test rcx, rcx
je 0x1400474df
mov qword [rdi + 0x4d90], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400474d2
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4d98], r12
mov rcx, qword [rdi + 0x4da8]
test rcx, rcx
je 0x140047511
mov qword [rdi + 0x4da0], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047504
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4da8], r12
mov rcx, qword [rdi + 0x4db8]
test rcx, rcx
je 0x140047543
mov qword [rdi + 0x4db0], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047536
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4db8], r12
mov rcx, qword [rdi + 0x5db8]
test rcx, rcx
je 0x140047575
mov qword [rdi + 0x5db0], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047568
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5db8], r12
mov rcx, qword [rdi + 0x5da8]
test rcx, rcx
je 0x1400475a7
mov qword [rdi + 0x5da0], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004759a
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5da8], r12
cmp qword [rdi + 0x5e30], 0
je 0x1400475d8
mov rbx, qword [rdi + 0x5e30]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x1400475d1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5e30], r12
mov rcx, qword [rdi + 0x5e40]
test rcx, rcx
je 0x14004760a
mov qword [rdi + 0x5e38], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x1400475fd
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5e40], r12
mov rcx, qword [rdi + 0x5e78]
test rcx, rcx
je 0x14004763c
mov qword [rdi + 0x5e70], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x14004762f
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5e78], r12
mov rcx, qword [rdi + 0x5e88]
test rcx, rcx
je 0x14004766e
mov qword [rdi + 0x5e80], r12
mov rax, qword [0x1400f18d0]
test rax, rax
je 0x140047661
dec dword [rax + 0xfc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5e88], r12
mov dword [rdi + 0x5e90], r12d
mov byte [rdi], 0
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret