Function at 0x4581f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov esi, dword [edx + 0xc0]
mov al, 2
mov dword [esp + 0x68], ecx
test esi, 0x800000
jne 0x45822b
mov ecx, dword [edx + 0xc8]
test ecx, 0x800000
jne 0x45822b
or ecx, esi
shr ecx, 0x15
and cl, 1
mov eax, ecx
mov byte [esp + 0x11], 1
mov byte [esp + 0x10], al
mov eax, dword [edx + 0xc4]
mov dword [esp + 4], 4
mov dword [esp + 8], 0
mov dword [esp + 0x5c], esi
mov dword [esp + 0x70], edx
mov dword [esp + 0xc], 0
mov dword [esp + 0x6c], eax
mov al, 1
mov dword [esp + 0x40], eax
mov edx, 0x54e7af
lea ecx, [esp + 4]
push 0x10
call sym.clap::parse::errors::start_error::h943797a73d225e37
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov esi, dword [eax]
test ecx, ecx
mov dword [esp + 0x14], ecx
je 0x4582ce
setns bl
js 0x458787
movzx eax, byte [0x5c6170]
mov eax, dword [0x5c6108]
test eax, eax
jne 0x4582b6
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x45874f
mov dword [0x5c6108], eax
mov ecx, dword [esp + 0x14]
push ecx
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ecx, dword [esp + 0x14]
mov edi, eax
test eax, eax
jne 0x4582d3
jmp 0x45874f
mov edi, 1
push ecx
push esi
push edi
call sym._memcpy
add esp, 0xc
mov esi, dword [esp + 0xc]
cmp esi, dword [esp + 8]
jne 0x4582f7
lea ecx, [esp + 4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0x14]
mov eax, esi
inc esi
shl eax, 4
mov dword [ebx + eax], edi
mov dword [ebx + eax + 4], ecx
mov dword [ebx + eax + 8], ecx
mov byte [ebx + eax + 0xc], 1
mov dword [esp + 0xc], esi
movzx eax, byte [0x5c6170]
mov eax, dword [0x5c6108]
test eax, eax
jne 0x45833b
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x458745
mov dword [0x5c6108], eax
push 0x23
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x458745
mov edi, eax
push 0x23
push 0x54e7bf
push eax
call sym._memcpy
add esp, 0xc
mov edx, dword [esp + 8]
cmp esi, edx
jne 0x45837e
lea ecx, [esp + 4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
mov edx, dword [esp + 8]
mov eax, esi
inc esi
shl eax, 4
cmp esi, edx
mov dword [ebx + eax], edi
mov dword [ebx + eax + 4], 0x23
mov dword [ebx + eax + 8], 0x23
mov byte [ebx + eax + 0xc], 4
movzx ecx, word [esp + 0x18]
mov word [ebx + eax + 0xd], cx
movzx ecx, byte [esp + 0x1a]
mov byte [ebx + eax + 0xf], cl
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0xc], esi
mov edi, dword [ecx]
movsd xmm0, qword [ecx + 4]
movaps xmmword [esp + 0x40], xmm0
jne 0x4583d7
lea ecx, [esp + 4]
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov ebx, dword [esp + 4]
mov esi, dword [esp + 0xc]
movdqa xmm0, xmmword [esp + 0x40]
shl esi, 4
mov dword [ebx + esi], edi
movq qword [ebx + esi + 4], xmm0
mov byte [ebx + esi + 0xc], 0
movzx eax, word [esp + 0x18]
mov word [ebx + esi + 0xd], ax
movzx eax, byte [esp + 0x1a]
mov byte [ebx + esi + 0xf], al
mov esi, dword [esp + 0xc]
inc esi
mov dword [esp + 0xc], esi
cmp esi, dword [esp + 8]
jne 0x45841f
lea ecx, [esp + 4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
mov eax, esi
inc esi
lea edi, [esp + 0x60]
mov dword [esp + 0x40], 0
shl eax, 4
mov dword [ebx + eax], 1
mov dword [ebx + eax + 4], 0
mov dword [ebx + eax + 8], 0
mov byte [ebx + eax + 0xc], 4
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], 0x54e830
mov dword [esp + 0x1c], 2
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x24], 1
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], sym.__LT_alloc..string..String_u20_as_u20_core..fmt..Display_GT_::fmt::hb93137a3e6a1b84a
lea ecx, [esp + 0x74]
lea edx, [esp + 0x18]
call dbg.format_inner
movsd xmm0, qword [esp + 0x78]
mov edi, dword [esp + 0x74]
cmp esi, dword [esp + 8]
movaps xmmword [esp + 0x40], xmm0
jne 0x4584bd
lea ecx, [esp + 4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov ebx, dword [esp + 4]
mov esi, dword [esp + 0xc]
movdqa xmm0, xmmword [esp + 0x40]
mov eax, esi
inc esi
shl eax, 4
mov dword [ebx + eax], edi
movq qword [ebx + eax + 4], xmm0
mov byte [ebx + eax + 0xc], 4
mov dword [esp + 0xc], esi
movzx eax, byte [0x5c6170]
mov eax, dword [0x5c6108]
test eax, eax
jne 0x4584fd
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x45875d
mov dword [0x5c6108], eax
push 2
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x45875d
mov word [eax], 0x2d2d
mov edi, eax
cmp esi, dword [esp + 8]
jne 0x45852f
lea ecx, [esp + 4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov ebx, dword [esp + 4]
mov esi, dword [esp + 0xc]
shl esi, 4
mov dword [esp + 0x40], 0
mov dword [ebx + esi], edi
mov dword [ebx + esi + 4], 2
mov dword [ebx + esi + 8], 2
mov byte [ebx + esi + 0xc], 0
movzx eax, word [esp + 0x18]
mov word [ebx + esi + 0xd], ax
movzx eax, byte [esp + 0x1a]
mov byte [ebx + esi + 0xf], al
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], 0x54e840
mov dword [esp + 0x1c], 2
mov dword [esp + 0x28], 0
mov esi, dword [esp + 0xc]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
mov dword [esp + 0x64], sym.__LT_alloc..string..String_u20_as_u20_core..fmt..Display_GT_::fmt::hb93137a3e6a1b84a
inc esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0xc], esi
lea ecx, [esp + 0x80]
lea edx, [esp + 0x18]
call dbg.format_inner
movsd xmm0, qword [esp + 0x84]
mov edi, dword [esp + 0x80]
cmp esi, dword [esp + 8]
movaps xmmword [esp + 0x40], xmm0
jne 0x4585df
lea ecx, [esp + 4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h000c0e560bae9379
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 4]
movdqa xmm0, xmmword [esp + 0x40]
mov ecx, esi
inc esi
shl ecx, 4
mov dword [eax + ecx], edi
movq qword [eax + ecx + 4], xmm0
mov byte [eax + ecx + 0xc], 4
mov dword [esp + 0xc], esi
mov edx, dword [ebp + 0x14]
lea esi, [esp + 4]
mov ecx, esi
call sym.clap::parse::errors::put_usage::h36909b850b914168
mov edx, dword [esp + 0x6c]
mov ecx, ebx
push esi
mov eax, dword [esp + 0x74]
push dword [eax + 0x124]
call sym.clap::parse::errors::try_help::ha7bb57862e3d2386
add esp, 8
movq xmm0, qword [esp + 4]
movsd xmm1, qword [esp + 0xc]
shr bl, 6
and bl, 1
movsd qword [esp + 0x20], xmm1
movq qword [esp + 0x18], xmm0
mov byte [esp + 0x3c], 2
mov dword [esp + 0x30], 4
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], 0
mov byte [esp + 0x3d], bl
mov byte [esp + 0x3e], 0
movzx eax, byte [0x5c6170]
mov eax, dword [0x5c6108]
test eax, eax
jne 0x45869a
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x458776
mov dword [0x5c6108], eax
push 0xc
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x458776
mov ecx, dword [ebp + 8]
mov esi, eax
mov eax, dword [ecx + 8]
mov dword [esi + 8], eax
movsd xmm0, qword [ecx]
movsd qword [esi], xmm0
cmp dword [esp + 0x34], 0
je 0x4586d7
push dword [esp + 0x30]
push 0
push dword [0x5c6108]
call sub.KERNEL32.dll_HeapFree
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], 1
mov eax, dword [esp + 0x68]
movsd xmm1, qword [esp + 0x20]
movsd xmm0, qword [esp + 0x18]
movsd xmm2, qword [esp + 0x38]
movsd qword [eax + 8], xmm1
movsd xmm1, qword [esp + 0x28]
movsd qword [eax], xmm0
movsd qword [eax + 0x20], xmm2
movsd qword [eax + 0x10], xmm1
movsd xmm1, qword [esp + 0x30]
movsd qword [eax + 0x18], xmm1
mov eax, dword [ebp + 0x10]
cmp dword [eax + 4], 0
je 0x45873d
push dword [eax]
push 0
push dword [0x5c6108]
call sub.KERNEL32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov bl, 1
mov dword [esp + 0x14], 0x23
movzx ecx, bl
mov edx, dword [esp + 0x14]
call dbg.handle_alloc_error
jmp 0x45878c
mov dword [esp + 0x40], 0
mov ecx, 1
mov edx, 2
call dbg.handle_alloc_error
jmp 0x45878c
mov ecx, 4
mov edx, 0xc
call dbg.handle_alloc_error
jmp 0x45878c
call sym.alloc::raw_vec::capacity_overflow::hd0578b62e5d0dfac
ud2