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

Disassembly:
push 0xffffffffffffffff
push 0x4a399b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2d0
mov eax, dword [esp + 0x2e8]
push ebx
push ebp
push esi
push edi
mov edi, ecx
cmp eax, 1
mov dword [esp + 0x44], edi
jne 0x46b126
cmp dword [esp + 0x304], 4
jne 0x46b126
lea esi, [edi + 0x10]
push 1
mov ecx, esi
mov dword [esp + 0x68], esi
call fcn.0046a830
xor ebp, ebp
cmp eax, ebp
jne 0x46b12b
mov eax, dword [esp + 0x2f4]
mov dword [esp + 0x48], ebp
cmp eax, ebp
je 0x46ab59
mov eax, dword [eax]
cmp eax, ebp
je 0x46ab59
mov edx, dword [eax + 4]
mov ecx, dword [eax]
cmp edx, ebp
ja 0x46ab59
jb 0x46ab55
cmp ecx, 0x80000000
ja 0x46ab59
mov dword [esp + 0x48], ecx
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x2f0]
lea edx, [esp + 0x14]
push edx
push 0x4aa208
mov eax, dword [eax]
mov dword [esp + 0x2f0], ebp
push eax
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [edi + 0x20]
lea edx, [esp + 0x70]
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov eax, esi
lea esi, [esp + 0x70]
sub esi, edi
mov edi, 4
mov ecx, dword [eax]
mov ebx, dword [eax + 0x14]
add ebx, ecx
mov dword [edx], ecx
mov dword [esi + eax], ebx
add edx, 4
add eax, 4
dec edi
jne 0x46ab9e
lea ecx, [esp + 0x70]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call fcn.00480060
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov dword [esp + 0xbc], ebp
mov dword [esp + 0xc0], eax
mov edx, dword [ecx + 0x4c]
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xc4], edx
mov byte [esp + 0x13], 0
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov byte [esp + 0x12], 0
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x46ad61
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x46ad61
mov eax, dword [esp + 0x48]
xor edi, edi
mov dword [esp + 0xc0], eax
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc4], edi
mov dword [esp + 0xa4], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0xc]
mov esi, eax
mov byte [esp + 0x13], 0
cmp esi, edi
jne 0x46ad36
mov ebp, dword [esp + 0x34]
mov ebx, dword [esp + 0x4c]
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x24]
mov edi, ebp
add edi, ebx
mov ebx, dword [esp + 0x38]
mov ecx, ebx
adc ecx, esi
cmp ecx, eax
jb 0x46acc8
ja 0x46acb0
cmp edi, dword [esp + 0x20]
jb 0x46acc8
cmp ecx, eax
ja 0x46acc4
jb 0x46acbc
cmp edi, dword [esp + 0x20]
ja 0x46acc4
mov al, byte [esp + 0x12]
test al, al
jne 0x46acc8
xor dl, dl
jmp 0x46acca
mov dl, 1
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
cmp ecx, esi
ja 0x46ae74
jb 0x46ace4
cmp edi, eax
ja 0x46ae74
test dl, dl
je 0x46ae74
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x4c], edi
add ecx, 1
mov edi, 0
lea ebx, [esp + 0x34]
adc edx, edi
push ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov esi, dword [eax]
push edx
push ecx
push eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
call dword [esi + 0xc]
mov esi, eax
mov byte [esp + 0x13], 0
cmp esi, edi
je 0x46ac88
cmp esi, 1
je 0x46ad59
cmp esi, 0x80004001
jne 0x46b0ec
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x46ad59
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [esp + 0x14], edi
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov cl, byte [esp + 0x12]
test cl, cl
je 0x46ada3
mov edx, dword [esp + 0xcc]
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x94]
sub edx, edi
add edx, ecx
mov ecx, dword [esp + 0x20]
sub ecx, eax
mov eax, dword [esp + 0x24]
sbb eax, esi
xor esi, esi
cmp ecx, edx
jne 0x46ada3
cmp eax, esi
jne 0x46ada3
mov dword [esp + 0x9c], 2
lea ecx, [esp + 0x70]
call fcn.00480380
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x90]
mov ebp, dword [esp + 0xcc]
xor esi, esi
mov ecx, dword [ebx + 0x20]
xor edx, edx
sub edi, ecx
mov eax, edi
sub eax, ebp
sbb esi, edx
mov edx, dword [esp + 0x28]
xor ebp, ebp
sub eax, edx
sbb esi, ebp
mov ebp, dword [esp + 0x20]
add eax, ebp
mov ebp, dword [esp + 0x24]
adc esi, ebp
mov ebp, dword [esp + 0xd8]
cmp ebp, 5
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
je 0x46b030
mov ebp, dword [esp + 0x98]
cmp ebp, 4
jae 0x46aefb
mov edx, dword [ebx + ebp*4 + 0x10]
mov esi, dword [esp + ebp*4 + 0x70]
mov eax, dword [esp + 0x2fc]
sub esi, edx
push esi
mov ecx, dword [eax + ebp*4]
call fcn.0040f168
mov edi, eax
test edi, edi
jne 0x46b0af
mov eax, dword [esp + 0x98]
cmp eax, 3
jne 0x46ae4f
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add edx, esi
adc ecx, edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ecx
mov ecx, dword [ebx + eax*4 + 0x10]
mov dword [esp + eax*4 + 0x70], ecx
mov eax, dword [esp + 0x98]
mov edx, dword [ebx + eax*4 + 0x24]
mov ecx, dword [ebx + eax*4 + 0x10]
add edx, ecx
mov dword [esp + eax*4 + 0x80], edx
jmp 0x46af95
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + 0x20]
add ecx, dword [esp + 0x28]
test dl, dl
mov dword [esp + 0x94], ecx
je 0x46aec3
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x94]
sub ecx, edi
mov edi, dword [esp + 0x90]
sub edx, edi
cmp edx, ecx
jb 0x46b009
mov edx, dword [esp + 0x94]
mov dword [esp + 0x9c], 1
sub edx, ecx
mov dword [esp + 0x94], edx
test ebx, ebx
ja 0x46ad61
jb 0x46aed9
cmp ebp, 0x80000000
ja 0x46ad61
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0xb8]
sub ecx, eax
mov dword [esp + 0xc0], ebp
add ecx, edx
mov dword [esp + 0xbc], ecx
jmp 0x46ad61
jne 0x46b0cc
cmp edx, edi
mov byte [esp + 0x13], 1
je 0x46af18
add ecx, edx
mov dword [esp + 0x94], ecx
jmp 0x46ac29
mov dl, byte [esp + 0x12]
test dl, dl
jne 0x46ac29
mov eax, dword [esp + 0x2f0]
mov edx, dword [ebx + 0x34]
lea ebp, [esp + 0x54]
mov dword [esp + 0x90], ecx
mov eax, dword [eax]
push ebp
mov dword [esp + 0x98], ecx
mov dword [esp + 0x58], edx
mov esi, dword [eax]
push edx
xor edi, edi
push ecx
push eax
mov dword [esp + 0x38], edi
call dword [esi + 0xc]
mov esi, eax
cmp esi, edi
jne 0x46b0ec
mov eax, dword [esp + 0x54]
cmp eax, edi
jne 0x46af71
mov byte [esp + 0x12], 1
jmp 0x46ac21
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ebx, dword [ebx + 0x20]
add esi, eax
adc edx, edi
add ebx, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x94], ebx
mov edx, dword [esp + 0x308]
test edx, edx
je 0x46ac21
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x60]
mov ecx, eax
mov edi, esi
sub ecx, ebp
sbb edi, ebx
mov dword [esp + 0x58], edi
jne 0x46afce
cmp ecx, 0x100000
jb 0x46ac29
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
add ecx, eax
mov dword [esp + 0x5c], eax
mov eax, dword [edx]
mov dword [esp + 0x68], ecx
lea ecx, [esp + 0x68]
mov dword [esp + 0x60], esi
push ecx
lea ecx, [esp + 0x1c]
adc edi, esi
push ecx
push edx
mov dword [esp + 0x78], edi
call dword [eax + 0xc]
mov esi, eax
test esi, esi
jne 0x46b109
jmp 0x46ac21
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46b0e5
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, 0x80004005
jmp 0x46b12b
mov esi, dword [esp + 0x2fc]
mov edi, dword [esp + 0x64]
lea ebx, [esp + 0x70]
mov dword [esp + 0x54], 0
sub ebx, esi
mov edx, dword [edi]
mov eax, dword [ebx + esi]
mov ecx, dword [esi]
sub eax, edx
push eax
call fcn.0040f168
mov ebp, eax
test ebp, ebp
jne 0x46b092
mov eax, dword [esp + 0x54]
add edi, 4
inc eax
add esi, 4
cmp eax, 4
mov dword [esp + 0x54], eax
jl 0x46b049
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46b08b
mov edx, dword [eax]
push eax
call dword [edx + 8]
xor eax, eax
jmp 0x46b12b
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46b0ab
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebp
jmp 0x46b12b
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46b0c8
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, edi
jmp 0x46b12b
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46b0e5
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, 0x80004005
jmp 0x46b12b
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
cmp eax, edi
je 0x46b105
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
jmp 0x46b12b
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46b122
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, esi
jmp 0x46b12b
mov eax, 0x80070057
mov ecx, dword [esp + 0x2e0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2dc
ret 0x1c