Function at 0x40d2b0
Capabilities:
Terminate process
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x478
mov esi, ecx
mov rdi, rdx
call fcn.0040bb80
lea rcx, str.._genidl.conf
add rdi, 8
mov qword [rsp + 0x68], 0
call fcn.00401d70
sub esi, 1
je 0x40d6da
movsxd rcx, esi
xor r14d, r14d
shl rcx, 3
call sub.msvcrt.dll_malloc
test esi, esi
mov qword [0x00414740], rax
jle 0x40d3b9
mov rbp, qword [fcn.0040d0c0]
mov r13d, 1
lea r12, [0x00411a6c]
jmp 0x40d34b
mov rax, qword [0x00414748]
lea rdx, [rax + 1]
mov qword [0x00414748], rdx
mov rdx, qword [0x00414740]
mov qword [rdx + rax*8], rbx
sub esi, 1
add rdi, 8
test esi, esi
jle 0x40d3b0
mov rbx, qword [rdi]
cmp byte [rbx], 0x2d
jne 0x40d323
movzx eax, byte [rbx + 1]
cmp al, 0x64
je 0x40d6b1
jle 0x40d680
cmp al, 0x72
je 0x40d7c0
cmp al, 0x76
je 0x40d7a2
cmp al, 0x68
je 0x40d6d0
mov ecx, 2
sub esi, 1
add rdi, 8
call rbp
mov r8, rbx
mov r14d, 1
lea rdx, str.Option__s_is_unknown._n
mov rcx, rax
call sub.msvcrt.dll_fprintf
test esi, esi
jg 0x40d34b
nop word [rax + rax]
test r14d, r14d
jne 0x40d6da
cmp qword [0x00414748], 0
je 0x40d6da
mov ecx, dword [0x0041475c]
lea r15, [rsp + 0x70]
xor r14d, r14d
call fcn.0040b950
cmp qword [0x00414748], 0
je 0x40d83c
nop dword [rax + rax]
mov rax, qword [0x00414740]
lea rdx, [0x004119e2]
lea rbx, [r14*8]
mov rcx, qword [rax + r14*8]
call sub.msvcrt.dll_fopen
test rax, rax
mov rdi, rax
je 0x40d880
lea rdx, [rsp + 0x5c]
mov rcx, rax
call fcn.00408790
mov r8d, dword [0x00414750]
mov ebp, eax
test r8d, r8d
je 0x40d46e
mov ecx, dword [rsp + 0x5c]
lea r9, [0x004116e3]
lea rsi, [0x004116e0]
test ecx, ecx
mov ecx, 2
cmovne rsi, r9
call qword [fcn.0040d0c0]
mov r8d, ebp
lea rdx, str.Found_PE_at__ld___s_bits__n
mov r9, rsi
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov rcx, rdi
call fcn.00408ae0
mov edx, dword [0x00414750]
mov esi, eax
test edx, edx
jne 0x40d900
mov rax, qword [0x00414740]
mov rbx, qword [rax + rbx]
test rbx, rbx
je 0x40d8e4
cmp byte [rbx], 0
je 0x40d8e4
mov edx, 0x5c
mov rcx, rbx
call sub.msvcrt.dll_strrchr
mov edx, 0x2f
mov rcx, rbx
mov rbp, rax
call sub.msvcrt.dll_strrchr
mov rdx, rbp
or rdx, rax
je 0x40d935
test rbp, rbp
je 0x40d922
test rax, rax
je 0x40d4e3
cmp rbp, rax
jbe 0x40d922
lea rcx, [rbp + 1]
call sub.msvcrt.dll__strdup
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x40d503
mov rcx, rax
call fcn.0040ba80
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll__strdup
mov edx, 0x2e
mov rcx, rax
mov qword [rsp + 0x38], rax
call sub.msvcrt.dll_strrchr
test rax, rax
je 0x40d527
mov byte [rax], 0
lea r12, [rsp + 0x60]
xor ebx, ebx
test esi, esi
lea rbp, [rsp + 0x68]
jg 0x40d5d6
jmp 0x40d80f
cmp esi, 1
mov r9, qword [0x0040e020]
je 0x40d7e0
mov r8, qword [rsp + 0x38]
lea rdx, str._s_s__d.idl
mov rcx, r15
mov dword [rsp + 0x20], ebx
call sub.msvcrt.dll_sprintf
lea rdx, [0x00411a4e]
mov rcx, r15
call sub.msvcrt.dll_fopen
test rax, rax
mov r13, rax
je 0x40d5cb
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
call fcn.0040aa70
test rax, rax
je 0x40d5b5
mov r8, qword [rsp + 0x40]
mov rdx, rax
mov rcx, r13
mov qword [rsp + 0x48], rax
call fcn.0040b1b0
mov rax, qword [rsp + 0x48]
mov rcx, rax
call fcn.0040a9e0
mov eax, dword [0x00414758]
test eax, eax
jne 0x40d860
mov rcx, r13
call sub.msvcrt.dll_fclose
add ebx, 1
cmp esi, ebx
je 0x40d80f
mov r9, r12
mov r8, rbp
mov edx, ebx
mov rcx, rdi
call fcn.004089c0
mov eax, dword [0x00414754]
test eax, eax
je 0x40d540
cmp eax, 1
jne 0x40d5cb
cmp esi, 1
mov r9, qword [0x0040e020]
je 0x40d8b0
mov r8, qword [rsp + 0x38]
lea rdx, str._s_s__d.h
mov rcx, r15
mov dword [rsp + 0x20], ebx
call sub.msvcrt.dll_sprintf
lea rdx, [0x00411a4e]
mov rcx, r15
call sub.msvcrt.dll_fopen
test rax, rax
mov r13, rax
je 0x40d5cb
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
call fcn.0040aa70
test rax, rax
je 0x40d5c3
mov r8, qword [rsp + 0x40]
mov rdx, rax
mov rcx, r13
mov qword [rsp + 0x48], rax
call fcn.0040afd0
mov rax, qword [rsp + 0x48]
mov rcx, rax
call fcn.0040a9e0
jmp 0x40d5c3
cmp al, 0x2d
je 0x40d783
cmp al, 0x62
jne 0x40d37d
cmp byte [rbx + 2], 0
jne 0x40d37d
mov rax, qword [rdi + 8]
sub esi, 1
add rdi, 8
mov qword [0x0040e020], rax
jmp 0x40d340
cmp byte [rbx + 2], 0
jne 0x40d37d
mov dword [0x00414758], r13d
jmp 0x40d340
cmp byte [rbx + 2], 0
jne 0x40d37d
mov rbx, qword [fcn.0040d0c0]
mov ecx, 2
call rbx
mov r8d, 0x24
mov edx, 1
lea rcx, str.Usage:_genidl__OPTION_...__FILE_..._n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 2
call rbx
mov r8d, 0x57
mov edx, 1
lea rcx, str.Dumps_IDL_information_from_typelib_data_found_in_PE32_PE32_executables_and_nTLB_files._n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.msvcrt.dll_fputc
mov ecx, 2
call rbx
mov r8d, 0x1d7
mov edx, 1
lea rcx, str.Options:_n___b_ARG____basedumpnameARG_n___________________________Specify_ARG_as_prefix_of_generated_idl_files._n___H____header_t_t_t_tGenerate_header_n___d____dump_______________Dump_additional_internal_debugging_information._n___v____verbose____________Show_additional_status_prints._n___h____help_______________Show_this_help._n___r____disable_fs_redirector_n___________________________Disable_Win64_FS_redirection__for_32_bit_n___________________________gendef_on_64_bit_Windows_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 2
call rbx
lea rcx, str._nReport_bugs_to__mingw_w64_public_lists.sourceforge.net__n
mov r8d, 0x39
mov edx, 1
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call sub.msvcrt.dll_exit
movzx eax, byte [rbx + 2]
lea r15, [rbx + 2]
sub eax, 0x48
cmp al, 0x2e
ja 0x40d37d
movzx eax, al
movsxd rax, dword [r12 + rax*4]
add rax, r12
jmp rax
cmp byte [rbx + 2], 0
jne 0x40d37d
add dword [0x00414750], 1
jmp 0x40d340
cmp byte [rbx + 2], 0
jne 0x40d37d
mov dword [0x0041475c], r13d
jmp 0x40d340
mov r8, qword [rsp + 0x38]
lea rdx, str._s_s.idl
mov rcx, r15
call sub.msvcrt.dll_sprintf
lea rdx, [0x00411a4e]
mov rcx, r15
call sub.msvcrt.dll_fopen
test rax, rax
mov r13, rax
jne 0x40d57f
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
mov rcx, rdi
call sub.msvcrt.dll_fclose
add r14, 1
cmp qword [0x00414748], r14
ja 0x40d3f0
lea rcx, str.._genidl.conf
call fcn.004022f0
xor eax, eax
add rsp, 0x478
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8, qword [rsp + 0x60]
mov rcx, r13
mov rdx, qword [rsp + 0x68]
call fcn.00406640
jmp 0x40d5c3
mov rax, qword [0x00414740]
mov ecx, 2
mov rbx, qword [rax + r14*8]
call qword [fcn.0040d0c0]
lea rdx, str.Failed_to_open_file___s._n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
jmp 0x40d82b
mov r8, qword [rsp + 0x38]
lea rdx, str._s_s.h
mov rcx, r15
call sub.msvcrt.dll_sprintf
lea rdx, [0x00411a4e]
mov rcx, r15
call sub.msvcrt.dll_fopen
test rax, rax
mov r13, rax
jne 0x40d638
jmp 0x40d80f
lea rcx, [0x00411a41]
call sub.msvcrt.dll__strdup
mov qword [rsp + 0x40], rax
jmp 0x40d503
mov ecx, 2
call qword [fcn.0040d0c0]
lea rdx, str.Contains__d_typelib_resource_s__n
mov r8d, esi
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x40d486
lea rcx, [rax + 1]
call sub.msvcrt.dll__strdup
mov qword [rsp + 0x40], rax
jmp 0x40d4f1
mov rcx, rbx
call sub.msvcrt.dll__strdup
mov qword [rsp + 0x40], rax
jmp 0x40d4f1