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

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
mov ebx, ecx
mov ecx, dword [esp + 0x78]
push edi
call fcn.004b6b2f
mov ecx, dword [esp + 0x74]
mov esi, eax
call fcn.004b6b2f
mov ebp, eax
cmp ebp, esi
cmovb ebp, esi
mov dword [esp + 0x18], ebp
test ebp, ebp
jne 0x4a7861
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
mov ecx, dword [esp + 0x6c]
push eax
call fcn.004b67f1
jmp 0x4a7c29
mov eax, 0x104
cmp eax, ebp
sbb ecx, ecx
xor eax, eax
neg ecx
inc eax
add ecx, 2
mov dword [esp + 0x40], eax
cmp ebp, 0x2e
mov esi, eax
cmovbe ecx, eax
shl esi, cl
mov eax, esi
mov dword [esp + 0x20], ecx
shl eax, cl
push ecx
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], eax
call fcn.004a82a5
mov edi, dword [esp + 0x48]
push dword [esp + 0x70]
lea eax, [edi + 0x14]
mov ecx, eax
mov dword [esp + 0x18], eax
call fcn.004b698c
push dword [esp + 0x78]
imul eax, esi, 0x14
mov dword [esp + 0x2c], eax
lea ecx, [edi + eax]
call fcn.004b698c
cmp dword [esp + 0x20], 1
mov ecx, ebx
mov eax, dword [ebx]
jne 0x4a78e8
push dword [esp + 0x78]
push dword [esp + 0x74]
call dword [eax + 0xc]
push eax
lea ecx, [edi + 0x3c]
call fcn.004b698c
jmp 0x4a7ae6
push dword [esp + 0x70]
add edi, 0x28
mov dword [esp + 0x3c], edi
call dword [eax + 0x18]
push eax
mov ecx, edi
call fcn.004b698c
mov edi, dword [esp + 0x48]
mov ecx, ebx
push dword [esp + 0x78]
imul eax, esi, 0x28
mov dword [esp + 0x48], eax
add eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [ebx]
call dword [eax + 0x18]
mov ecx, dword [esp + 0x3c]
push eax
call fcn.004b698c
cmp esi, 3
jbe 0x4a795a
lea ebp, [edi + 0x3c]
lea edi, [esi - 4]
mov esi, dword [esp + 0x38]
shr edi, 1
inc edi
mov edx, dword [ebx]
lea eax, [ebp - 0x28]
push esi
push eax
mov ecx, ebx
call dword [edx + 0xc]
push eax
mov ecx, ebp
call fcn.004b698c
add ebp, 0x28
sub edi, 1
jne 0x4a7936
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x48]
mov ecx, dword [esp + 0x28]
lea eax, [esi + 1]
mov ebp, dword [esp + 0x10]
add ecx, 0x14
mov edx, dword [esp + 0x14]
add ecx, edi
lea edi, [esi - 2]
mov dword [esp + 0x30], eax
shr edi, 1
inc edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x24], eax
cmp eax, ebp
jae 0x4a79d2
mov edi, ecx
mov dword [esp + 0x2c], edx
mov ecx, edx
push dword [esp + 0x78]
mov eax, dword [ebx]
push ecx
mov ecx, ebx
call dword [eax + 0xc]
push eax
mov ecx, edi
call fcn.004b698c
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add eax, esi
add ecx, dword [esp + 0x28]
add edi, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
cmp eax, ebp
jb 0x4a7990
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
add eax, 2
add ecx, 0x28
add edx, 0x28
mov dword [esp + 0x30], eax
sub edi, 1
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x38], edi
jne 0x4a7980
imul edi, esi, 3
cmp edi, ebp
mov ebp, dword [esp + 0x18]
jae 0x4a7a4e
imul eax, edi, 0x14
lea ecx, [esi + esi]
mov dword [esp + 0x38], ecx
add eax, dword [esp + 0x48]
mov dword [esp + 0x78], eax
mov eax, edi
mov esi, dword [esp + 0x78]
sub eax, ecx
imul ebp, eax, 0x14
add ebp, dword [esp + 0x48]
push dword [esp + 0x3c]
mov eax, dword [ebx]
mov ecx, ebx
push ebp
call dword [eax + 0xc]
push eax
mov ecx, esi
call fcn.004b698c
add edi, dword [esp + 0x38]
add ebp, dword [esp + 0x44]
add esi, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
cmp edi, eax
jb 0x4a7a1c
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
jmp 0x4a7a52
mov eax, dword [esp + 0x10]
mov ecx, esi
mov dword [esp + 0x78], ecx
cmp esi, eax
jae 0x4a7ae6
lea edx, [esi + esi]
imul eax, edx, 0x14
mov edi, edx
push 2
pop ebp
mov dword [esp + 0x44], edx
mov dword [esp + 0x34], eax
lea eax, [esi + 2]
imul eax, eax, 0x14
add eax, dword [esp + 0x48]
sub ebp, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ebp
add ebp, edi
cmp ebp, edi
jae 0x4a7ac8
mov ebp, eax
mov esi, edi
mov eax, dword [esp + 0x38]
add eax, edi
sub esi, eax
dec esi
shr esi, 1
inc esi
push dword [esp + 0x70]
mov edx, dword [ebx]
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call dword [edx + 0xc]
push eax
mov ecx, ebp
call fcn.004b698c
add ebp, 0x28
sub esi, 1
jne 0x4a7a9d
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x44]
add eax, dword [esp + 0x34]
add ecx, edx
mov ebp, dword [esp + 0x38]
add edi, edx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x3c], eax
cmp ecx, dword [esp + 0x10]
jb 0x4a7a87
mov ebp, dword [esp + 0x18]
lea ecx, [esp + 0x54]
call fcn.004b677d
lea eax, [ebp - 1]
mov dword [esp + 0x70], eax
jmp 0x4a7bf4
mov ecx, dword [esp + 0x74]
push ebp
call fcn.004b69fa
mov ecx, dword [esp + 0x7c]
movzx eax, al
push ebp
lea edi, [eax + edi*2]
call fcn.004b69fa
movzx eax, al
lea esi, [eax + esi*2]
test ebp, ebp
je 0x4a7b35
mov ecx, dword [esp + 0x1c]
lea eax, [edi + edi]
cmp eax, ecx
jae 0x4a7b35
lea eax, [esi + esi]
cmp eax, ecx
jb 0x4a7bf8
mov eax, dword [esp + 0x70]
sub eax, ebp
xor ecx, ecx
mov ebp, eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x70], eax
test edi, edi
jne 0x4a7b4f
test esi, esi
je 0x4a7b5f
mov eax, esi
or eax, edi
test al, 1
jne 0x4a7b5f
shr edi, 1
shr esi, 1
dec ebp
inc ecx
jmp 0x4a7b47
cmp byte [esp + 0x40], 0
mov dword [esp + 0x3c], ecx
je 0x4a7b8a
mov ecx, dword [esp + 0x20]
shl esi, cl
lea ecx, [esp + 0x54]
add esi, edi
imul eax, esi, 0x14
add eax, dword [esp + 0x48]
push eax
call fcn.004b698c
mov byte [esp + 0x40], 0
jmp 0x4a7bcd
test ebp, ebp
je 0x4a7ba9
mov eax, dword [ebx]
lea ecx, [esp + 0x54]
push ecx
mov ecx, ebx
call dword [eax + 0x18]
push eax
lea ecx, [esp + 0x58]
call fcn.004b698c
sub ebp, 1
jne 0x4a7b8e
test edi, edi
jne 0x4a7bb1
test esi, esi
je 0x4a7bcd
mov ecx, dword [esp + 0x20]
mov edx, dword [ebx]
shl esi, cl
mov ecx, ebx
add esi, edi
imul eax, esi, 0x14
add eax, dword [esp + 0x48]
push eax
lea eax, [esp + 0x58]
push eax
call dword [edx + 0x20]
mov esi, dword [esp + 0x3c]
test esi, esi
je 0x4a7bf0
mov eax, dword [ebx]
lea ecx, [esp + 0x54]
push ecx
mov ecx, ebx
call dword [eax + 0x18]
push eax
lea ecx, [esp + 0x58]
call fcn.004b698c
sub esi, 1
jne 0x4a7bd5
mov ebp, dword [esp + 0x78]
xor esi, esi
xor edi, edi
sub ebp, 1
mov dword [esp + 0x78], ebp
jns 0x4a7afb
mov ecx, dword [esp + 0x6c]
lea eax, [esp + 0x54]
push eax
call fcn.004b67f1
push dword [esp + 0x5c]
push dword [esp + 0x64]
call fcn.00472a06
lea ecx, [esp + 0x48]
call fcn.004a74c2
mov eax, dword [esp + 0x6c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0x14