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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x250
mov dword [esp + 0x40], edx
mov edx, ecx
mov eax, dword [0x94bccc]
mov dword [esp + 0x6c], ecx
test eax, eax
je 0x64655e
mov dword [esp + 8], 2
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [eax + 4]
mov dword [esp + 0x74], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x78], ecx
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
dec eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov esi, dword [eax + 8]
imul eax, edx, 0xf0
mov dword [esp + 0x7c], edx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x50], eax
jmp 0x6460d4
lea ecx, [esp + 0xd8]
call fcn.00646900
dec dword [esp + 0x48]
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], esi
cmp dword [ecx + 0x38], eax
jbe 0x6467a7
mov eax, dword [ecx + 0x34]
test eax, eax
je 0x6467a7
mov edi, dword [esp + 0x50]
mov edx, dword [eax + edi]
xor edx, 3
or edx, dword [eax + edi + 4]
je 0x6467a7
add eax, dword [esp + 0x50]
cmp dword [eax + 0xcc], esi
jne 0x6467a7
cmp dword [eax + 0x64], 0
je 0x646425
mov edx, dword [eax + 0x68]
mov dword [esp + 0x84], ebx
cmp dword [esp + 0x78], edx
jbe 0x646806
mov ecx, dword [eax + 0x6c]
lea esi, [edx + edx*2]
shl esi, 6
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x74]
mov ebx, dword [ecx + esi + 4]
mov edi, dword [ecx + esi]
mov dword [ecx + esi], 2
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x84]
cmp edi, 2
mov dword [ecx + esi + 4], ebx
lea ecx, [ecx + esi]
je 0x6467ff
mov ebx, edx
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x48]
cmp ebx, dword [esp + 0x80]
mov dword [esp + 0x4c], ebx
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ebx
jne 0x6461b0
mov esi, dword [esp + 0x24]
test edi, edi
jne 0x64681a
mov dword [eax + 0x64], 0
jmp 0x6461ca
mov esi, dword [esp + 0x24]
test edi, edi
je 0x64682e
mov edx, dword [esp + 0x44]
mov dword [eax + 0x64], 1
mov dword [eax + 0x68], edx
movzx ebx, byte [ecx + 8]
add ecx, 9
push 0xb7
push ecx
lea eax, [esp + 0x19c]
push eax
call fcn.007bd9b0
add esp, 0xc
cmp bl, 9
je 0x646425
mov byte [esp + 0xd8], bl
push 0xb7
lea eax, [esp + 0x198]
push eax
lea eax, [esp + 0xe1]
push eax
call fcn.007bd9b0
add esp, 0xc
mov eax, dword [0x94bccc]
test eax, eax
jne 0x6460c0
movzx eax, byte [0x94ab1c]
test al, al
je 0x6460c0
movzx eax, al
cmp eax, 1
je 0x646257
cmp eax, 2
je 0x64629f
mov ecx, 0x94ab14
call fcn.007d3740
test al, al
je 0x6460c0
movzx eax, al
cmp eax, 2
je 0x64629f
mov eax, dword [0x94ab14]
mov ecx, dword [0x94bfb8]
cmp ecx, 2
jne 0x6460c0
cmp dword [0x94bcc0], 0
mov edx, dword [str.SetGlobalDefaultErrora_global_default_trace_dispatcher_has_already_been_set]
mov ecx, dword [0x94bcc8]
je 0x64628f
mov esi, dword [ecx + 8]
dec esi
and esi, 0xfffffff8
lea edx, [esi + edx + 8]
mov esi, dword [esp + 0x24]
push eax
push edx
call dword [ecx + 0x14]
add esp, 8
test al, al
je 0x6460c0
mov eax, dword [0x94ab14]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x64687b
mov ebx, dword [eax + 0x1c]
mov edx, dword [eax + 0x24]
mov edi, dword [eax + 0x28]
cmp ecx, 1
mov dword [esp + 0x54], 0x8aa2e8
mov dword [esp + 0x58], 1
mov dword [esp + 0x64], 0
mov dword [esp + 0x5c], 0x93d1f8
mov dword [esp + 0x60], 0
mov dword [esp + 0xc4], ebx
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xcc], edx
mov dword [esp + 0xd0], edi
mov dword [esp + 0xd4], 0
je 0x64687b
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ecx
mov dword [esp + 0xac], edx
lea edx, [esp + 0x8c]
mov dword [esp + 0xb0], edi
lea edi, [esp + 0xd8]
lea ecx, [eax + 0x1c]
mov dword [esp + 0xb4], 1
mov dword [esp + 0xb8], edx
lea edx, [esp + 0xc4]
mov dword [esp + 0x88], edi
lea edi, [esp + 0x54]
mov dword [esp + 0xbc], 2
mov dword [esp + 0xc0], ecx
mov dword [esp + 0x8c], edx
lea edx, [esp + 0xa4]
mov dword [esp + 0x90], edi
mov dword [esp + 0x94], 0x8a682c
lea edi, [esp + 0x88]
mov dword [esp + 0x98], edx
lea edx, [esp + 0xb8]
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], 0x8aa2f0
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 1
mov eax, dword [0x94bfb8]
cmp eax, 2
jne 0x6460c0
cmp dword [0x94bcc0], 0
mov ebx, dword [str.SetGlobalDefaultErrora_global_default_trace_dispatcher_has_already_been_set]
mov edi, dword [0x94bcc8]
je 0x646400
mov eax, dword [edi + 8]
dec eax
and eax, 0xfffffff8
lea ebx, [eax + ebx + 8]
lea eax, [esp + 0x28]
push eax
push ebx
call dword [edi + 0x28]
add esp, 8
test al, al
je 0x6460c0
lea eax, [esp + 0x28]
push eax
push ebx
call dword [edi + 0x2c]
add esp, 8
jmp 0x6460c0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov esi, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
cmp dword [esi + 0x38], ecx
jbe 0x646838
mov ebx, dword [esi + 0x34]
test ebx, ebx
je 0x646838
imul edi, ecx, 0xf0
mov edx, dword [ebx + edi]
xor edx, 3
or edx, dword [ebx + edi + 4]
je 0x646838
add ebx, edi
cmp dword [ebx + 0xcc], eax
jne 0x646838
mov dword [ebx + 0xd8], 0
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
cmp dword [esi + 0x38], ecx
jbe 0x646838
mov esi, dword [esi + 0x34]
test esi, esi
je 0x646838
mov edx, dword [esi + edi]
xor edx, 3
or edx, dword [esi + edi + 4]
je 0x646838
add esi, edi
cmp dword [esi + 0xcc], eax
jne 0x646838
mov edx, dword [esp + 0x6c]
mov dword [esi + 0xd4], 0
cmp dword [edx + 0x3c], 1
jne 0x6464d9
cmp ecx, dword [edx + 0x40]
jne 0x6464d9
cmp eax, dword [edx + 0x44]
jne 0x6464d9
mov dword [edx + 0x3c], 2
mov eax, dword [esp + 8]
cmp eax, 2
je 0x646556
test eax, eax
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
je 0x6464f9
mov edx, dword [eax + 8]
dec edx
and edx, 0xfffffff8
lea ecx, [edx + ecx + 8]
mov edx, esp
push edx
push ecx
call dword [eax + 0x34]
add esp, 8
mov edx, dword [esp + 8]
cmp edx, 2
je 0x646556
test edx, edx
mov eax, dword [esp]
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
je 0x64652a
mov edi, dword [edx + 8]
dec edi
and edi, 0xfffffff8
lea esi, [edi + esi + 8]
push ecx
push eax
push esi
call dword [edx + 0x40]
add esp, 0xc
mov eax, dword [esp + 8]
cmp eax, 2
je 0x646556
test eax, eax
je 0x646556
mov eax, dword [esp + 0xc]
lock dec dword [eax]
jne 0x646556
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
call fcn.0075aba0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx eax, byte [0x94ab10]
test al, al
je 0x646066
movzx eax, al
cmp eax, 1
je 0x646594
cmp eax, 2
je 0x6465d8
mov ecx, 0x94ab08
call fcn.007d3740
test al, al
je 0x646066
movzx eax, al
cmp eax, 2
je 0x6465d8
mov eax, dword [0x94ab08]
mov ecx, dword [0x94bfb8]
cmp ecx, 2
jne 0x646066
cmp dword [0x94bcc0], 0
mov edx, dword [str.SetGlobalDefaultErrora_global_default_trace_dispatcher_has_already_been_set]
mov ecx, dword [0x94bcc8]
je 0x6465c8
mov esi, dword [ecx + 8]
dec esi
and esi, 0xfffffff8
lea edx, [esi + edx + 8]
push eax
push edx
call dword [ecx + 0x14]
add esp, 8
test al, al
je 0x646066
mov esi, dword [0x94ab08]
mov eax, dword [esi + 0x20]
test eax, eax
je 0x6468e7
mov ecx, dword [esi + 0x1c]
movsd xmm0, qword [esi + 0x24]
mov dword [esp + 0x194], ecx
mov dword [esp + 0x198], eax
mov eax, dword [ebp + 8]
movlps qword [esp + 0x19c], xmm0
mov dword [esp + 0x1a4], 0
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], eax
cmp dword [ecx + 0x38], edx
jbe 0x64688f
mov ecx, dword [ecx + 0x34]
test ecx, ecx
je 0x64688f
imul edx, edx, 0xf0
mov edi, dword [ecx + edx]
xor edi, 3
or edi, dword [ecx + edx + 4]
je 0x64688f
add ecx, edx
cmp dword [ecx + 0xcc], eax
jne 0x64688f
lea edx, [esp + 0x194]
add ecx, 0xcc
lea eax, [esi + 0x1c]
lea edi, [esp + 0xa4]
mov dword [esp + 0x28], edx
lea edx, [esp + 0x28]
mov dword [esp + 0x2c], edi
mov dword [esp + 0xa4], ecx
mov dword [esp + 0x30], 0x8aa054
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], eax
mov eax, dword [0x94bfb8]
cmp eax, 2
jne 0x64673b
cmp dword [0x94bcc0], 0
mov edi, dword [str.SetGlobalDefaultErrora_global_default_trace_dispatcher_has_already_been_set]
mov ebx, dword [0x94bcc8]
lea eax, [esp + 0x54]
mov dword [esp + 0xe8], esi
mov dword [esp + 0xec], eax
mov dword [esp + 0xdc], 0
mov dword [esp + 0xd8], 1
je 0x64676e
mov eax, dword [ebx + 8]
lea ecx, [esp + 0xd8]
dec eax
and eax, 0xfffffff8
lea eax, [eax + edi + 8]
push ecx
push eax
call dword [ebx + 0x1c]
add esp, 8
lock inc dword [edi]
jle 0x6468fb
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], 1
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], esi
mov eax, dword [ebx + 8]
dec eax
and eax, 0xfffffff8
lea edi, [eax + edi + 8]
jmp 0x646798
mov dword [esp + 4], 0
mov dword [esp], 0xdead
mov dword [esp + 8], 0
mov dword [esp + 0xc], str.SetGlobalDefaultErrora_global_default_trace_dispatcher_has_already_been_set
mov dword [esp + 0x10], 0x93b6a0
mov edi, str.SetGlobalDefaultErrora_global_default_trace_dispatcher_has_already_been_set
mov ebx, 0x93b6a0
jmp 0x646794
lea eax, [esp + 0xd8]
push eax
push edi
call dword [ebx + 0x1c]
add esp, 8
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], esi
mov eax, esp
push eax
push edi
call dword [ebx + 0x30]
add esp, 8
jmp 0x646076
lea eax, [esp + 0x58]
mov dword [esp + 0xd8], 0x828150
mov dword [esp + 0xdc], 1
mov dword [esp + 0xe8], 0
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x2c], 0x47c5e0
lea ecx, [esp + 0xd8]
mov edx, 0x828168
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], 1
call fcn.007c1b50
mov eax, dword [esp + 0x44]
mov dword [ecx + 4], eax
mov ecx, 0x8ac6bc
mov edx, 0xb
push 0x8aad14
call fcn.007c2000
mov ecx, 0x8aad34
mov edx, 0x25
push 0x8aad5c
call fcn.007c1ca0
mov ecx, 0x8aad24
call fcn.007c1fe0
lea eax, [esp + 0x2c]
mov dword [esp + 0xd8], 0x828150
mov dword [esp + 0xdc], 1
mov dword [esp + 0xe8], 0
mov dword [esp + 0x194], eax
mov dword [esp + 0x198], 0x47c5e0
lea eax, [esp + 0x194]
jmp 0x6467dc
mov ecx, 0x8a6758
mov edx, 0x22
push 0x8aa2d0
call fcn.007c2000
mov ecx, esp
lea eax, [esp + 0x90]
mov dword [esp + 0xd8], 0x828150
mov dword [esp + 0xdc], 1
mov dword [esp + 0xe8], 0
mov edx, 0x828158
mov dword [esp + 0xe0], ecx
lea ecx, [esp + 0xd8]
mov dword [esp], eax
mov dword [esp + 4], 0x47c5e0
mov dword [esp + 0xe4], 1
call fcn.007c1b50
mov ecx, 0x8a6758
mov edx, 0x22
push 0x8aa2c0
call fcn.007c2000
ud2