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

Disassembly:
mov rax, rsp
sub rsp, 0x68
cmp r8d, 2
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rdi
mov qword [rax - 0x10], r13
mov ebp, r9d
mov r13d, edx
mov ebx, r8d
mov rdi, rcx
jae 0x4a992e
xor r8d, r8d
jmp 0x4a9965
mov eax, 0xcccccccd
mul dword [rcx + 0x34]
lea eax, [r8 - 2]
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
xor edx, edx
mov r8d, eax
mov eax, dword [0x0072d218]
div dword [rdi + 0x30]
imul r8d, ecx
inc eax
add r8d, 2
cmp r8d, eax
jne 0x4a9965
inc r8d
cmp r8d, ebx
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x50], r15
je 0x4a9b55
mov eax, dword [0x0072d218]
xor edx, edx
div dword [rdi + 0x30]
inc eax
cmp ebx, eax
je 0x4a9b55
mov rax, qword [rdi + 0x18]
mov rdx, qword [rax + 0x50]
movzx eax, byte [rdx + 0x26]
movzx ecx, byte [rdx + 0x25]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdx + 0x24]
shl eax, 0x18
shl ecx, 8
or ecx, eax
movzx eax, byte [rdx + 0x27]
or ecx, eax
jne 0x4a99c6
lea eax, [rcx + 0x65]
jmp 0x4a9bb5
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x30]
mov edx, ebx
mov rcx, rdi
call fcn.0048d190
test eax, eax
jne 0x4a9bb5
cmp byte [rsp + 0x30], 1
jne 0x4a9a0f
lea r9, [0x006a0b6c]
lea rdx, str.database_corruption_at_line__d_of___.10s_
lea ecx, [rax + 0xb]
mov r8d, 0xd7fc
call fcn.00461f70
mov eax, reloc.WS2_32.dll_inet_addr
jmp 0x4a9bb5
cmp byte [rsp + 0x30], 2
jne 0x4a9a5c
test ebp, ebp
jne 0x4a9bb3
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x38]
mov r9d, ebx
mov rcx, rdi
mov byte [rsp + 0x20], 1
call fcn.004a4380
test eax, eax
jne 0x4a9bb5
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x4a9b59
mov rcx, qword [rcx + 0x68]
call fcn.004a1e30
jmp 0x4a9b59
mov rcx, qword [rdi]
lea r8, [rsp + 0x38]
xor esi, esi
xor r9d, r9d
mov edx, ebx
xor r15b, r15b
mov dword [rsp + 0x34], esi
call fcn.0048ca10
test eax, eax
jne 0x4a9bb5
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx + 8]
mov r12, qword [rcx + 0x10]
mov qword [r12 + 0x50], rax
xor eax, eax
cmp ebx, 1
mov qword [r12 + 0x68], rcx
mov ecx, 0x64
mov qword [r12 + 0x48], rdi
cmove eax, ecx
test ebp, ebp
mov dword [r12 + 0x70], ebx
mov byte [r12 + 6], al
jne 0x4a9ad0
mov r15b, 2
mov esi, r13d
mov dword [rsp + 0x34], r13d
nop
nop
nop
nop
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x48]
mov r9d, esi
mov rcx, rdi
mov byte [rsp + 0x20], r15b
call fcn.004a4380
test eax, eax
mov esi, eax
jne 0x4a9b16
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x4a9b03
mov rcx, qword [rcx + 0x68]
call fcn.004a1e30
test ebp, ebp
mov eax, dword [rsp + 0x38]
je 0x4a9b27
cmp eax, r13d
jbe 0x4a9b27
mov esi, dword [rsp + 0x34]
jmp 0x4a9ad0
mov rcx, qword [r12 + 0x68]
call fcn.004a1e30
mov eax, esi
jmp 0x4a9bb5
mov r9d, dword [rsp + 0x40]
movzx r8d, byte [rsp + 0x30]
mov rdx, r12
mov rcx, rdi
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], eax
call fcn.004a3290
mov rcx, qword [r12 + 0x68]
mov esi, eax
call fcn.004a1e30
test esi, esi
jne 0x4a9b20
test ebp, ebp
jne 0x4a9bb3
mov eax, dword [0x0072d218]
xor edx, edx
lea r8d, [rbx - 2]
div dword [rdi + 0x30]
lea r9d, [rax + 1]
nop
add ebx, 0xffffffff
add r8d, 0xffffffff
cmp ebx, r9d
je 0x4a9b70
cmp ebx, 2
jae 0x4a9b85
xor eax, eax
jmp 0x4a9ba8
mov eax, 0xcccccccd
mul dword [rdi + 0x34]
mov eax, r8d
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
imul eax, ecx
add eax, 2
cmp eax, r9d
jne 0x4a9ba8
inc eax
cmp eax, ebx
je 0x4a9b70
mov byte [rdi + 0x23], 1
mov dword [rdi + 0x3c], ebx
xor eax, eax
mov r15, qword [rsp + 0x50]
mov r13, qword [rsp + 0x58]
mov r12, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x68
ret