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

Disassembly:
push 0x28
mov eax, 0x516d75
call fcn.00502a53
mov esi, dword [ebp + 0xc]
push esi
mov eax, dword [esi]
call dword [eax + 0x70]
mov ecx, dword [esi]
push esi
mov dword [ebp - 0x14], eax
call dword [ecx + 0x78]
cmp dword [ebp + 0x10], 2
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0xd], 1
mov ebx, dword [ecx + 0x18]
mov dword [ebp - 0x18], ebx
je 0x496fff
xor edi, edi
test ebx, ebx
jle 0x496e75
mov eax, dword [ecx + 0x14]
mov esi, dword [eax + edi*4]
push esi
mov eax, dword [esi]
call dword [eax + 0x24]
pop ecx
cmp eax, 2
jne 0x496e6d
mov eax, dword [esi + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x54]
pop ecx
test al, al
je 0x496e6d
mov eax, dword [esi + 0x18]
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x60]
pop ecx
pop ecx
test eax, eax
je 0x496e6d
push eax
lea ecx, [ebp - 0x20]
call fcn.004fed56
and dword [ebp - 4], 0
lea eax, [ebp - 0x20]
push 1
push eax
push dword [ebp + 8]
call fcn.0049a99b
add esp, 0xc
test eax, eax
je 0x496e61
cmp dword [eax + 8], 0
je 0x496e61
cmp byte [eax + 0x14], 0
jne 0x496e61
mov eax, dword [esi]
push 2
push esi
call dword [eax + 0x40]
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004fed5c
mov ecx, dword [ebp + 8]
inc edi
cmp edi, ebx
jl 0x496df8
xor edi, edi
test ebx, ebx
jle 0x496ed0
mov eax, dword [ecx + 0x14]
mov esi, dword [eax + edi*4]
push esi
mov dword [ebp - 0x20], esi
mov eax, dword [esi]
call dword [eax + 0x24]
pop ecx
cmp eax, 3
jne 0x496ec8
push esi
call fcn.0049b414
pop ecx
test al, al
je 0x496ec8
mov eax, dword [esi + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 0x24]
pop ecx
mov ecx, dword [ebp - 0x20]
mov esi, eax
push 1
mov edx, dword [ecx]
call dword [edx]
mov eax, dword [ebp - 0x14]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x68]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x14]
and dword [eax + edi*4], 0
jmp 0x496ecb
mov ecx, dword [ebp + 8]
inc edi
cmp edi, ebx
jl 0x496e7b
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
jle 0x496f33
mov eax, dword [ecx + 0x14]
mov edi, dword [eax + ebx*4]
test edi, edi
je 0x496f2d
mov eax, dword [edi]
push edi
call dword [eax + 0x24]
pop ecx
cmp eax, 2
jne 0x496f2a
mov eax, dword [edi]
push edi
call dword [eax + 0x9c]
pop ecx
test al, al
je 0x496f2a
mov eax, dword [edi + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, dword [edi]
mov esi, eax
pop ecx
push 1
mov ecx, edi
call dword [edx]
mov eax, dword [ebp - 0x24]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0xf8]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x14]
and dword [eax + ebx*4], 0
jmp 0x496f2d
mov ecx, dword [ebp + 8]
inc ebx
cmp ebx, dword [ebp - 0x18]
jl 0x496ed7
mov ebx, dword [ebp - 0x18]
xor edi, edi
test ebx, ebx
jle 0x496fff
mov eax, dword [ecx + 0x14]
mov esi, dword [eax + edi*4]
test esi, esi
je 0x496ff6
mov eax, dword [esi]
push esi
call dword [eax + 0x24]
pop ecx
cmp eax, 2
jne 0x496ff3
cmp dword [esi + 8], 0
je 0x496ff3
cmp byte [esi + 0x14], 0
jne 0x496ff3
mov eax, dword [esi + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov ecx, dword [esi + 0x18]
push ecx
mov dword [ebp - 0x20], eax
mov edx, dword [ecx]
call dword [edx + 0x110]
pop ecx
pop ecx
test al, al
je 0x4970ec
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x78]
push dword [esi + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1b4]
add esp, 0xc
test al, al
je 0x4970ec
lea ecx, [ebp - 0x1c]
call fcn.004fedb0
xor edx, edx
inc edx
mov dword [ebp - 4], edx
mov eax, dword [esi + 0x18]
push edx
lea edx, [ebp - 0x1c]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x40]
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x1c]
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0x304]
add esp, 0x14
mov byte [ebp - 0xd], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004fed5c
mov ecx, dword [ebp + 8]
inc edi
cmp edi, ebx
jl 0x496f40
cmp dword [ebp + 0x10], 1
je 0x4971cc
xor edi, edi
mov dword [ebp - 0x24], edi
test ebx, ebx
jle 0x497166
mov eax, dword [ecx + 0x14]
mov esi, dword [eax + edi*4]
mov dword [ebp - 0x34], esi
test esi, esi
je 0x49715a
mov eax, dword [esi]
push esi
call dword [eax + 0x24]
pop ecx
cmp eax, 3
jne 0x497157
cmp dword [esi + 8], 0
je 0x497157
cmp byte [esi + 0x14], 0
jne 0x497157
mov eax, dword [esi + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x74]
mov dword [ebp - 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x497135
mov ecx, dword [eax]
push 0
push dword [ebp - 0x1c]
push eax
call dword [ecx + 0x6c]
and dword [ebp - 0x20], 0
mov ecx, eax
add esp, 0xc
mov dword [ebp - 0x30], ecx
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x2c], eax
test eax, eax
jle 0x497135
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x28]
mov eax, dword [ecx + 8]
mov ecx, dword [esi]
push dword [eax + ebx*4]
push esi
call dword [ecx + 0x38]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49711f
mov ecx, dword [edi]
push dword [ebp - 0x1c]
push edi
call dword [ecx + 0x44]
pop ecx
pop ecx
test al, al
je 0x49711f
mov eax, dword [edi]
push edi
call dword [eax + 0x3c]
pop ecx
mov ecx, eax
xor eax, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], eax
test ecx, ecx
jle 0x49711f
mov ecx, dword [edi]
push eax
push edi
call dword [ecx + 0x40]
pop ecx
pop ecx
cmp eax, dword [ebp - 0x1c]
je 0x497114
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0x28]
jl 0x4970d0
jmp 0x49711f
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov ecx, dword [ebp - 0x24]
push dword [ebp - 0x20]
push ecx
mov eax, dword [ecx]
call dword [eax + 0xf8]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x14]
and dword [eax + edi*4], 0
jmp 0x496ff6
mov eax, dword [edi]
push dword [ebp - 0x20]
push edi
call dword [eax + 0x58]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x30]
inc ebx
cmp ebx, dword [ebp - 0x2c]
jl 0x497098
mov esi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov ecx, dword [ebp - 0x14]
push dword [ebp - 0x1c]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x68]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x14]
and dword [eax + edi*4], 0
jmp 0x49715a
mov ecx, dword [ebp + 8]
inc edi
mov dword [ebp - 0x24], edi
cmp edi, ebx
jl 0x497016
mov edi, dword [ebp - 0x14]
push 0
push 0
push edi
mov eax, dword [edi]
call dword [eax + 0x78]
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x30], ebx
cmp dword [ebx + 0xc], 0
jne 0x4971c3
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x74]
mov edi, eax
push 0
push edi
mov ecx, dword [edi]
call dword [ecx + 0x70]
mov dword [ebp + 0xc], eax
add esp, 0xc
xor esi, esi
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x34], eax
test eax, eax
jle 0x4971c0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 8]
mov ecx, dword [edi]
push dword [eax + esi*4]
push edi
call dword [ecx + 0x60]
inc esi
pop ecx
pop ecx
cmp esi, dword [ebp - 0x34]
jl 0x4971a9
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x14]
mov eax, dword [edi]
push ebx
push edi
call dword [eax + 0x7c]
pop ecx
pop ecx
cmp dword [ebp + 0x10], 0
jne 0x497231
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
jle 0x497231
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edi, dword [eax + ebx*4]
test edi, edi
je 0x49722b
mov eax, dword [edi]
push edi
call dword [eax + 0x24]
pop ecx
cmp eax, 4
jne 0x49722b
cmp dword [edi + 8], 0
je 0x49722b
cmp byte [edi + 0x14], 0
jne 0x49722b
mov eax, dword [edi + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, dword [edi]
mov esi, eax
pop ecx
push 1
mov ecx, edi
call dword [edx]
mov eax, dword [ebp - 0x14]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0xac]
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov eax, dword [eax + 0x14]
and dword [eax + ebx*4], 0
inc ebx
cmp ebx, dword [ebp - 0x18]
jl 0x4971d9
mov ecx, dword [ebp + 8]
add ecx, 8
push ecx
call fcn.004aa042
mov al, byte [ebp - 0xd]
pop ecx
call fcn.00502a1c
ret