Function at 0x58db60
Capabilities:
Create pipe
Create two anonymous pipes
Parse pe header
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x7d8
lea rbx, [0x006655d0]
mov dword [rsp + 0x828], edx
mov qword [rsp + 0x830], r8
lea r13, [rsp + 0xf0]
mov qword [rsp + 0x838], r9
mov qword [rsp + 0x820], rcx
lea r15, [rsp + 0x1d0]
call fcn.0058cae0
mov rax, qword [rsp + 0x830]
mov rcx, r13
lea r14, [rsp + 0xa8]
lea r12, [rsp + 0x2b0]
mov rax, qword [rax]
mov rdi, rax
mov qword [rsp + 0x58], rax
call fcn.005757e0
mov rdx, rdi
mov r8d, 0xffffffff
mov rcx, r13
call fcn.00575800
lea rax, [rsp + 0x4c0]
mov esi, dword [rsp + 0xf8]
lea rdi, str.pipe
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0xa4]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
mov edx, esi
mov rcx, r13
call fcn.005758d0
mov r8d, 0xffffffff
mov rdx, rbx
mov rcx, r13
call fcn.00575800
mov edx, dword [rsp + 0xf8]
mov rcx, qword [rsp + 0xf0]
mov r8, r15
call fcn.00581b60
mov rdx, qword [0x00670c10]
xor r8d, r8d
xor ecx, ecx
mov r9d, 0x104
mov r10, qword [rdx]
mov rdx, rax
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r12
call qword [r10 + 0xb8]
mov rcx, r15
mov ebp, eax
call fcn.00575950
test ebp, ebp
jne 0x58dd00
add rbx, 5
cmp rbx, rdi
jne 0x58dc1f
mov rcx, r13
mov ebx, 1
call fcn.00575950
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00585b40
mov rcx, qword [rsp + 0x820]
call fcn.00540d30
mov r8, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x820]
lea r9, [0x006655a2]
lea rdx, str.couldnt_execute__
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call fcn.00561a50
mov eax, ebx
add rsp, 0x7d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x00670c10]
mov rcx, r12
mov rax, qword [rax]
call qword [rax + 0x60]
cmp eax, 0xffffffff
je 0x58dc8c
and eax, 0x10
mov dword [rsp + 0x7c], eax
jne 0x58dc8c
mov r8, r15
mov edx, 0xffffffff
mov rcx, r12
call fcn.00581b80
mov rbp, qword [rsp + 0x60]
mov rdx, rax
mov rcx, rbp
call sub.msvcrt.dll_strcpy
mov rcx, r15
call fcn.00575950
mov rcx, rbp
mov edx, 0x2e
call sub.msvcrt.dll_strrchr
test rax, rax
mov rbp, rax
je 0x58dd91
lea rdx, [0x00665488]
mov rcx, rax
call sub.msvcrt.dll__stricmp_1
test eax, eax
je 0x58de4a
lea rdx, [0x0066548d]
mov rcx, rbp
call sub.msvcrt.dll__stricmp_1
test eax, eax
je 0x58de4a
mov rax, qword [0x00670c10]
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, r12
mov rax, qword [rax]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [rax + 0x28]
cmp rax, 0xffffffffffffffff
mov r10, rax
je 0x58dc8c
xor eax, eax
mov rcx, r10
mov qword [rsp + 0x80], r10
mov word [rsp + 0xb0], ax
mov qword [rsp + 0x20], 0
mov r8d, 0x40
mov r9, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0xb0], 0x5a4d
mov r10, qword [rsp + 0x80]
je 0x58ea97
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbp, rbp
je 0x58dc8c
lea rdx, [0x00665492]
mov rcx, rbp
call sub.msvcrt.dll__stricmp_1
test eax, eax
jne 0x58dc8c
mov dword [rsp + 0x88], 1
mov rcx, r13
call fcn.00575950
mov rax, qword [0x00670c10]
mov r8d, 0x104
mov rdx, r12
mov rcx, r12
mov rax, qword [rax]
call qword [rax + 0x78]
mov r8, r15
mov edx, 0xffffffff
mov rcx, r12
call fcn.00581b80
mov rcx, qword [rsp + 0x60]
mov rdx, rax
call sub.msvcrt.dll_strcpy
mov rcx, r15
call fcn.00575950
mov rcx, qword [rsp + 0x60]
mov edx, 0x5c
xor ebp, ebp
call sub.msvcrt.dll_strrchr
test rax, rax
je 0x58df03
lea rcx, [rax + 1]
lea rdx, str.cmd.exe
xor ebp, ebp
call sub.msvcrt.dll__stricmp_1
test eax, eax
jne 0x58df03
mov rax, qword [rsp + 0x830]
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x58df03
lea rdx, [0x0066549f]
xor ebp, ebp
call sub.msvcrt.dll__stricmp_1
cmp eax, 1
setb bpl
test eax, eax
mov eax, 1
cmovne eax, dword [rsp + 0x88]
mov dword [rsp + 0x88], eax
mov rcx, r15
mov rdi, r13
call fcn.005757e0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rsi, rax
xor eax, eax
cmp qword [rsp + 0x838], 0
mov ecx, 0xd
mov dword [rsp + 0xb0], 0x18
mov qword [rsp + 0xb8], 0
rep stosq qword [rdi], rax
mov dword [rsp + 0xc0], 1
mov dword [rsp + 0xf0], 0x68
mov rdx, 0xffffffffffffffff
mov dword [rsp + 0x12c], 0x100
mov qword [rsp + 0x140], 0xffffffffffffffff
mov qword [rsp + 0x148], 0xffffffffffffffff
mov qword [rsp + 0x150], 0xffffffffffffffff
je 0x58dfa0
mov rax, qword [rsp + 0x838]
cmp dword [rax], 3
je 0x58e575
cmp qword [rsp + 0x840], 0
mov rdi, 0xffffffffffffffff
je 0x58dfc3
mov rax, qword [rsp + 0x840]
cmp dword [rax], 3
je 0x58e57e
cmp qword [rsp + 0x848], 0
mov rbx, 0xffffffffffffffff
je 0x58dfe6
mov rax, qword [rsp + 0x848]
cmp dword [rax], 3
je 0x58e587
cmp rdx, 0xffffffffffffffff
je 0x58e658
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
lea r9, [r13 + 0x50]
mov dword [rsp + 0x20], 0
mov r8, rsi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp qword [rsp + 0x140], 0xffffffffffffffff
je 0x58e9b5
cmp rdi, 0xffffffffffffffff
je 0x58e68b
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
lea r9, [r13 + 0x58]
mov dword [rsp + 0x20], 0
mov r8, rsi
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rax, qword [rsp + 0x148]
cmp rax, 0xffffffffffffffff
je 0x58ea0b
cmp rbx, 0xffffffffffffffff
je 0x58e724
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
lea r9, [r13 + 0x60]
mov dword [rsp + 0x20], 0
mov r8, rsi
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rax, qword [rsp + 0x150]
cmp rax, 0xffffffffffffffff
je 0x58e6e6
call fcn.005814b0
cmp eax, 2
je 0x58e590
call fcn.0058c500
test eax, eax
je 0x58e55a
cmp dword [rsp + 0x88], 1
je 0x58e9ae
mov rcx, r12
call fcn.005757e0
mov rdx, qword [rsp + 0x1d0]
mov r8d, 0xffffffff
mov rcx, r12
call fcn.00575800
mov r9d, dword [rsp + 0x1d8]
test r9d, r9d
jle 0x58e12c
call fcn.005814b0
cmp eax, 2
je 0x58e767
lea rdx, [0x0066559d]
mov r8d, 1
mov rcx, r12
call fcn.00575800
mov eax, dword [rsp + 0x828]
mov dword [rsp + 0x8c], 0
test eax, eax
jle 0x58e33d
mov eax, ebp
xor edi, edi
mov qword [rsp + 0x90], r15
and eax, 1
mov qword [rsp + 0x98], r13
mov byte [rsp + 0x70], al
lea rax, [rsp + 0xa4]
mov qword [rsp + 0x80], rax
jmp 0x58e190
cmp byte [rsp + 0x70], 0
je 0x58e471
mov edi, 2
cmp dword [rsp + 0x828], edi
jle 0x58e30d
test edi, edi
je 0x58e173
mov rdx, qword [rsp + 0x830]
movsxd rax, edi
mov r8d, 1
mov rcx, r12
mov rsi, qword [rdx + rax*8]
lea rdx, [0x0066559d]
call fcn.00575800
cmp byte [rsi], 0
jne 0x58e48a
lea rdx, [0x0066553c]
mov r8d, 1
mov rcx, r12
call fcn.00575800
mov dword [rsp + 0x58], 1
movzx r13d, byte [rsp + 0x58]
mov r15, rsi
and r13d, 1
jmp 0x58e204
cmp al, 0x22
je 0x58e2a0
test al, al
je 0x58e2e0
add rsi, 1
movzx eax, byte [rsi]
mov r14, r15
cmp al, 0x5c
jne 0x58e1f0
movzx eax, byte [rsi + 1]
cmp al, 0x5c
je 0x58e223
cmp al, 0x22
je 0x58e223
test al, al
jne 0x58e200
test r13b, r13b
je 0x58e200
mov r8d, esi
mov rdx, r15
mov rcx, r12
sub r8d, r15d
mov rbx, rsi
call fcn.00575800
jmp 0x58e254
test al, al
jne 0x58e249
test r13b, r13b
jne 0x58e260
cmp al, 0x5c
jne 0x58e460
mov rbx, rbp
movzx eax, byte [rbx + 1]
lea rbp, [rbx + 1]
cmp al, 0x22
jne 0x58e240
mov r8, rbp
mov rdx, rsi
mov rcx, r12
sub r8, rsi
mov r15, rbp
mov r14, rbp
mov dword [rsp + 0x68], r8d
call fcn.00575800
mov r9d, dword [rsp + 0x68]
mov rdx, rsi
mov r8d, r9d
mov rcx, r12
call fcn.00575800
movzx eax, byte [rbx + 1]
mov rsi, rbp
cmp al, 0x22
jne 0x58e1f8
nop
mov r8d, esi
mov rdx, r15
mov rcx, r12
sub r8d, r14d
lea r15, [rsi + 1]
call fcn.00575800
lea rdx, [0x0066559f]
mov r8d, 2
mov rcx, r12
mov r14, r15
call fcn.00575800
movzx eax, byte [rsi]
test al, al
jne 0x58e200
nop dword [rax + rax]
mov r8d, esi
mov rcx, r12
mov rdx, r15
sub r8d, r14d
call fcn.00575800
mov ecx, dword [rsp + 0x58]
test ecx, ecx
jne 0x58e540
add edi, 1
cmp dword [rsp + 0x828], edi
jg 0x58e190
mov edx, dword [rsp + 0x8c]
mov r15, qword [rsp + 0x90]
mov r13, qword [rsp + 0x98]
test edx, edx
je 0x58e33d
lea rdx, [0x0066553c]
mov r8d, 1
mov rcx, r12
call fcn.00575800
mov rcx, r15
call fcn.00575950
mov edx, dword [rsp + 0x2b8]
mov rcx, qword [rsp + 0x2b0]
mov r8, r15
call fcn.00581b60
mov rcx, r12
call fcn.00575950
mov rax, qword [0x00670c10]
mov edi, dword [rsp + 0x7c]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov rdx, qword [rsp + 0x1d0]
mov rax, qword [rax]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 1
call qword [rax + 0x30]
test eax, eax
je 0x58e600
cmp dword [rsp + 0x88], 1
je 0x58e9f3
mov edx, 0x1388
mov rcx, qword [rsp + 0x2b0]
xor ebx, ebx
call qword [sym.imp.USER32.dll_WaitForInputIdle]
mov rcx, qword [rsp + 0x2b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x2b0]
mov rax, qword [rsp + 0x850]
test rcx, rcx
mov qword [rax], rcx
je 0x58e40a
mov edx, dword [rsp + 0x2c0]
call fcn.0058db00
mov rcx, r15
call fcn.00575950
mov rcx, qword [rsp + 0x140]
cmp rcx, 0xffffffffffffffff
je 0x58e426
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x148]
cmp rcx, 0xffffffffffffffff
je 0x58e43a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x150]
cmp rcx, 0xffffffffffffffff
je 0x58dcea
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x58dcea
mov r9d, ebp
mov r15, rbp
mov r14, rbp
sub r9d, esi
jmp 0x58e281
cmp byte [rsp + 0x4c0], 0
jne 0x58e485
mov rsi, qword [rsp + 0x60]
jmp 0x58e1c1
mov rsi, qword [rsp + 0x60]
mov r13, qword [rsp + 0x80]
mov rbp, rsi
mov rdx, r13
mov rcx, rbp
call fcn.00571ad0
movzx ecx, word [rsp + 0xa4]
movsxd rbx, eax
call fcn.00572b20
test eax, eax
jne 0x58e1c1
movzx r8d, word [rsp + 0xa4]
cmp r8w, 0x60
je 0x58e1c1
lea eax, [r8 - 0x2b]
cmp ax, 1
mov eax, r8d
setbe dl
and eax, 0xffffffbf
sub eax, 0x3b
cmp ax, 3
lea eax, [r8 - 0x5d]
setbe cl
cmp r8w, 0x5b
sete r9b
cmp ax, 1
setbe al
or r9d, eax
lea eax, [r8 - 0x26]
cmp ax, 3
setbe al
or r9d, eax
or r9d, ecx
cmp r8w, 0x21
sete al
or r9d, eax
or dl, r9b
jne 0x58e1c1
add rbp, rbx
cmp byte [rbp], 0
jne 0x58e495
mov dword [rsp + 0x58], 0
jmp 0x58e1de
lea rdx, [0x0066553c]
mov r8d, 1
mov rcx, r12
call fcn.00575800
jmp 0x58e2fd
cmp dword [rsp + 0x88], 1
je 0x58e830
mov dword [rsp + 0x7c], 8
jmp 0x58e0de
mov rdx, qword [rax + 8]
jmp 0x58dfa0
mov rdi, qword [rax + 8]
jmp 0x58dfc3
mov rbx, qword [rax + 8]
jmp 0x58dfe6
call fcn.0058c500
test eax, eax
jne 0x58e5e5
cmp dword [rsp + 0x88], 1
je 0x58e79d
test ebp, ebp
je 0x58e568
mov dword [rsp + 0x7c], 8
mov rax, qword [0x00670980]
mov r8d, 0xffffffff
mov rdx, qword [rax]
test rdx, rdx
je 0x58e5d1
cmp byte [rdx], 0
jne 0x58e7d3
lea rdx, str.cmd.exe__s__c
mov rcx, r15
call fcn.00575800
jmp 0x58e0de
test ebp, ebp
jne 0x58e5b3
cmp dword [rsp + 0x88], 1
jne 0x58e0de
jmp 0x58e7c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov ebx, 1
call fcn.00585b40
mov rcx, qword [rsp + 0x820]
call fcn.00540d30
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x830]
lea r9, [0x006655a2]
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x820]
lea rdx, str.couldnt_execute__
mov r8, qword [rax]
call fcn.00561a50
jmp 0x58e40a
xor r9d, r9d
lea rcx, [r13 + 0x50]
lea r8, [rsp + 0xb0]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x58e018
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x58e018
call fcn.005814b0
cmp eax, 1
jne 0x58e6a3
cmp dword [rsp + 0x88], 1
je 0x58e7f5
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
lea r9, [rsp + 0xb0]
mov dword [rsp + 0x20], 4
xor r8d, r8d
mov edx, 0x40000000
lea rcx, str.NUL:
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x148], rax
jmp 0x58e064
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov ebx, 1
call fcn.00585b40
mov rcx, qword [rsp + 0x820]
call fcn.00540d30
mov rcx, qword [rsp + 0x820]
lea rdx, str.couldnt_duplicate_error_handle:
mov r8, rax
xor r9d, r9d
call fcn.00561a50
jmp 0x58e40a
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
lea r9, [rsp + 0xb0]
mov dword [rsp + 0x20], 3
xor r8d, r8d
mov edx, 0x40000000
lea rcx, str.NUL:
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x150], rax
jmp 0x58e0ab
lea rdx, [0x0066559a]
mov r8d, 2
mov rcx, r12
call fcn.00575800
mov r8d, dword [rsp + 0x828]
mov dword [rsp + 0x8c], 1
test r8d, r8d
jg 0x58e146
jmp 0x58e328
xor r11d, r11d
or dword [rsp + 0x12c], 1
test ebp, ebp
mov word [rsp + 0x130], r11w
mov dword [rsp + 0x7c], 0x10
jne 0x58e5b3
call fcn.0058c500
test eax, eax
jne 0x58e0de
jmp 0x58e5b3
mov rcx, r15
call fcn.00575800
lea rdx, str.__s__c
mov r8d, 0xffffffff
mov rcx, r15
call fcn.00575800
jmp 0x58e0de
xor r9d, r9d
lea rdx, [r13 + 0x58]
lea r8, [rsp + 0xb0]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x58e05c
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x148]
jmp 0x58e064
or dword [rsp + 0x12c], 1
xor r10d, r10d
mov esi, 0x10
mov word [rsp + 0x130], r10w
mov rcx, r12
call fcn.005757e0
lea rdx, str.tclpip85.dll
mov r8d, 0xffffffff
mov rcx, r12
call fcn.00575800
call fcn.00576750
add dword [rax], 1
lea rdx, [rsp + 0xa4]
mov rcx, rax
mov rdi, rax
call fcn.00551220
movsxd rdx, dword [rsp + 0xa4]
lea rdx, [rax + rdx - 1]
cmp rax, rdx
jb 0x58e8ad
jmp 0x58e969
sub rdx, 1
cmp rdx, rax
je 0x58e969
cmp byte [rdx], 0x2f
jne 0x58e8a0
sub rdx, rax
mov rcx, rax
add edx, 1
mov dword [rsp + 0xa4], edx
call fcn.005649f0
mov rdx, qword [rsp + 0x2b0]
mov rbx, rax
mov rcx, rax
mov r8d, 0xffffffff
call fcn.005653d0
add dword [rbx], 1
mov rcx, qword [rsp + 0x820]
mov rdx, rbx
call fcn.00556650
test eax, eax
jne 0x58ea86
xor edx, edx
mov rcx, rbx
call fcn.00541550
test eax, eax
je 0x58ea49
mov r8, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x820]
lea r9, str.__not_found
lea rdx, str.Tcl_pipe_dll__
mov qword [rsp + 0x20], 0
call fcn.00561a50
mov eax, dword [rdi]
sub eax, 1
test eax, eax
mov dword [rdi], eax
jle 0x58eadc
mov eax, dword [rbx]
sub eax, 1
test eax, eax
mov dword [rbx], eax
jle 0x58eabb
mov rcx, r12
mov ebx, 1
call fcn.00575950
jmp 0x58e40a
cmp byte [rdx], 0x2f
je 0x58e8b2
mov rcx, qword [rsp + 0x820]
lea r9, [0x0066553c]
lea rdx, str.no___in_executable_path_name__
mov r8, rax
mov qword [rsp + 0x20], 0
call fcn.00561a50
mov eax, dword [rdi]
sub eax, 1
test eax, eax
mov dword [rdi], eax
jg 0x58e957
mov rcx, rdi
call fcn.00550fa0
jmp 0x58e957
xor esi, esi
jmp 0x58e849
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov ebx, 1
call fcn.00585b40
mov rcx, qword [rsp + 0x820]
call fcn.00540d30
mov rcx, qword [rsp + 0x820]
lea rdx, str.couldnt_duplicate_input_handle:
mov r8, rax
xor r9d, r9d
call fcn.00561a50
jmp 0x58e40a
mov edx, 0x32
mov rcx, qword [rsp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x58e3c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov ebx, 1
call fcn.00585b40
mov rcx, qword [rsp + 0x820]
call fcn.00540d30
mov rcx, qword [rsp + 0x820]
lea rdx, str.couldnt_duplicate_output_handle:
mov r8, rax
xor r9d, r9d
call fcn.00561a50
jmp 0x58e40a
mov rdx, qword [rsp + 0x2b0]
mov r8d, 0xffffffff
mov rcx, r15
call fcn.00575800
mov eax, dword [rdi]
sub eax, 1
test eax, eax
mov dword [rdi], eax
jle 0x58ead2
mov eax, dword [rbx]
sub eax, 1
test eax, eax
mov dword [rbx], eax
jle 0x58eac8
mov rcx, r12
call fcn.00575950
mov dword [rsp + 0x7c], esi
jmp 0x58e0de
lea rcx, str.Tcl_FSConvertToPathType_failed
call fcn.00552d60
jmp 0x58e8fb
cmp word [rsp + 0xc8], 0x40
je 0x58eae9
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x88], 1
jmp 0x58de55
mov rcx, rbx
call fcn.00550fa0
jmp 0x58e957
mov rcx, rbx
call fcn.00550fa0
jmp 0x58ea75
mov rcx, rdi
call fcn.00550fa0
jmp 0x58ea6a
mov rcx, rdi
call fcn.00550fa0
jmp 0x58e948
xor r9d, r9d
xor r8d, r8d
mov rcx, r10
mov edx, dword [rsp + 0xec]
mov qword [rsp + 0x58], r10
mov byte [rsp + 0xa0], 0
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r10, qword [rsp + 0x58]
lea rdx, [rsp + 0xa0]
mov r9, qword [rsp + 0x68]
mov r8d, 2
mov qword [rsp + 0x20], 0
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r10, qword [rsp + 0x58]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, byte [rsp + 0xa0]
cmp al, 0x4e
je 0x58eb89
cmp al, 0x50
mov dword [rsp + 0x88], 1
jne 0x58de55
cmp byte [rsp + 0xa1], 0x45
jne 0x58de55
mov rcx, r13
call fcn.00575950
mov dword [rsp + 0x88], 3
jmp 0x58de9b
cmp byte [rsp + 0xa1], 0x45
je 0x58ebab
mov rcx, r13
call fcn.00575950
mov dword [rsp + 0x88], 1
jmp 0x58de5d
mov dword [rsp + 0x88], 2
jmp 0x58de55