Function at 0x180031a70
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x18007d010]
xor rax, rsp
mov qword [rsp + 0x240], rax
cmp qword [0x180082ed8], 0
jne 0x180031e06
lea rcx, [0x180072cb0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x180031e06
mov r8d, 0x104
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea r8, str.libsgit2.dll
mov edx, 0x104
lea rcx, [rsp + 0x30]
call fcn.180043690
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x180031e06
mov ecx, 0x70
call fcn.1800383c4
mov qword [rsp + 0x28], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
movups xmmword [rax + 0x50], xmm0
movups xmmword [rax + 0x60], xmm0
mov rbx, qword [0x180082ed8]
mov qword [0x180082ed8], rax
test rbx, rbx
je 0x180031b5d
cmp byte [rbx + 0x18], 0
je 0x180031b49
call qword [rbx + 0x10]
nop
mov edx, 0x70
mov rcx, rbx
call fcn.180038400
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 1
lea rdx, str.git_libgit2_version
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx], rax
test rax, rax
jne 0x180031b8b
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_repository_open_ext
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x20], rax
test rax, rax
jne 0x180031bb6
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_repository_workdir
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x28], rax
test rax, rax
jne 0x180031be1
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_repository_index
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x30], rax
test rax, rax
jne 0x180031c0c
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_index_get_bypath
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x38], rax
test rax, rax
jne 0x180031c37
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_blob_lookup
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x40], rax
test rax, rax
jne 0x180031c62
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_blob_filtered_content
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x48], rax
test rax, rax
jne 0x180031c8d
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_buf_free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x50], rax
test rax, rax
jne 0x180031cb8
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_blob_free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x58], rax
test rax, rax
jne 0x180031ce3
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_index_free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x60], rax
test rax, rax
jne 0x180031d0e
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_repository_free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x68], rax
test rax, rax
jne 0x180031d39
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
mov rbx, qword [0x180082ed8]
cmp byte [rbx + 0x18], 0
je 0x180031ddf
lea r8, [rsp + 0x28]
lea rdx, [rsp + 0x24]
lea rcx, [rsp + 0x20]
call qword [rbx]
mov eax, dword [rsp + 0x20]
test eax, eax
jg 0x180031d6c
jne 0x180031dd2
cmp dword [rsp + 0x24], 0x16
jl 0x180031dd2
lea rdx, str.git_libgit2_init
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 8], rax
test rax, rax
jne 0x180031d97
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
lea rdx, str.git_libgit2_shutdown
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180082ed8]
mov qword [rcx + 0x10], rax
test rax, rax
jne 0x180031dc2
mov rax, qword [0x180082ed8]
mov byte [rax + 0x18], 0
mov rbx, qword [0x180082ed8]
cmp byte [rbx + 0x18], 0
je 0x180031ddf
call qword [rbx + 8]
mov rbx, qword [0x180082ed8]
cmp byte [rbx + 0x18], 0
jne 0x180031e06
mov qword [0x180082ed8], 0
test rbx, rbx
je 0x180031e06
cmp byte [rbx + 0x18], 0
je 0x180031df9
call qword [rbx + 0x10]
nop
mov edx, 0x70
mov rcx, rbx
call fcn.180038400
lea rax, [0x180082ed8]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1800383a0
mov rbx, qword [rsp + 0x260]
add rsp, 0x250
pop rdi
ret