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

Disassembly:
push 0xffffffffffffffff
push 0x4a360b
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 0x46add6
cmp dword [esp + 0x304], 4
jne 0x46add6
lea esi, [edi + 0x10]
push 1
mov ecx, esi
mov dword [esp + 0x68], esi
call fcn.0046a4f0
xor ebp, ebp
cmp eax, ebp
jne 0x46addb
mov eax, dword [esp + 0x2f4]
mov dword [esp + 0x48], ebp
cmp eax, ebp
je 0x46a809
mov eax, dword [eax]
cmp eax, ebp
je 0x46a809
mov edx, dword [eax + 4]
mov ecx, dword [eax]
cmp edx, ebp
ja 0x46a809
jb 0x46a805
cmp ecx, 0x80000000
ja 0x46a809
mov dword [esp + 0x48], ecx
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x2f0]
lea edx, [esp + 0x14]
push edx
push 0x4a91e0
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 0x46a84e
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.0047fcd0
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 0x46aa11
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x46aa11
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 0x46a9e6
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 0x46a978
ja 0x46a960
cmp edi, dword [esp + 0x20]
jb 0x46a978
cmp ecx, eax
ja 0x46a974
jb 0x46a96c
cmp edi, dword [esp + 0x20]
ja 0x46a974
mov al, byte [esp + 0x12]
test al, al
jne 0x46a978
xor dl, dl
jmp 0x46a97a
mov dl, 1
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
cmp ecx, esi
ja 0x46ab24
jb 0x46a994
cmp edi, eax
ja 0x46ab24
test dl, dl
je 0x46ab24
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 0x46a938
cmp esi, 1
je 0x46aa09
cmp esi, 0x80004001
jne 0x46ad9c
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x46aa09
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 0x46aa53
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 0x46aa53
cmp eax, esi
jne 0x46aa53
mov dword [esp + 0x9c], 2
lea ecx, [esp + 0x70]
call fcn.0047fff0
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 0x46ace0
mov ebp, dword [esp + 0x98]
cmp ebp, 4
jae 0x46abab
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.0040ef24
mov edi, eax
test edi, edi
jne 0x46ad5f
mov eax, dword [esp + 0x98]
cmp eax, 3
jne 0x46aaff
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 0x46ac45
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + 0x20]
add ecx, dword [esp + 0x28]
test dl, dl
mov dword [esp + 0x94], ecx
je 0x46ab73
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 0x46acb9
mov edx, dword [esp + 0x94]
mov dword [esp + 0x9c], 1
sub edx, ecx
mov dword [esp + 0x94], edx
test ebx, ebx
ja 0x46aa11
jb 0x46ab89
cmp ebp, 0x80000000
ja 0x46aa11
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 0x46aa11
jne 0x46ad7c
cmp edx, edi
mov byte [esp + 0x13], 1
je 0x46abc8
add ecx, edx
mov dword [esp + 0x94], ecx
jmp 0x46a8d9
mov dl, byte [esp + 0x12]
test dl, dl
jne 0x46a8d9
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 0x46ad9c
mov eax, dword [esp + 0x54]
cmp eax, edi
jne 0x46ac21
mov byte [esp + 0x12], 1
jmp 0x46a8d1
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 0x46a8d1
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 0x46ac7e
cmp ecx, 0x100000
jb 0x46a8d9
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 0x46adb9
jmp 0x46a8d1
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46ad95
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, 0x80004005
jmp 0x46addb
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.0040ef24
mov ebp, eax
test ebp, ebp
jne 0x46ad42
mov eax, dword [esp + 0x54]
add edi, 4
inc eax
add esi, 4
cmp eax, 4
mov dword [esp + 0x54], eax
jl 0x46acf9
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46ad3b
mov edx, dword [eax]
push eax
call dword [edx + 8]
xor eax, eax
jmp 0x46addb
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46ad5b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebp
jmp 0x46addb
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46ad78
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, edi
jmp 0x46addb
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46ad95
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, 0x80004005
jmp 0x46addb
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
cmp eax, edi
je 0x46adb5
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
jmp 0x46addb
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2e8], 0xffffffff
test eax, eax
je 0x46add2
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, esi
jmp 0x46addb
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