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

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push esi
mov esi, dword [esp + 0x30]
xor ebp, ebp
push edi
xor edi, edi
mov dword [esp + 0x10], edi
cmp dword [esi + 0x3c], edi
je 0x4b65f3
mov edi, dword [ebx + 4]
mov dword [ebx + 4], ebp
movzx eax, word [esi + 0x72]
push eax
push ebx
push esi
call fcn.004b6ed0
add esp, 0xc
mov dword [ebx + 4], edi
test eax, eax
jne 0x4b6a00
lea eax, [ebp + 1]
xor edi, edi
jmp 0x4b6620
mov dword [ebx], 0xffffffff
movzx eax, word [esi + 0x72]
push eax
push ebx
push esi
call fcn.004b6ed0
add esp, 0xc
mov dword [ebx], edi
test eax, eax
je 0x4b661e
cmp dword [esi + 0x50], edi
je 0x4b6a00
mov eax, 1
jmp 0x4b6620
xor eax, eax
movzx ecx, word [esi + 0x7e]
dec ecx
mov dword [esp + 0x34], ecx
test eax, eax
je 0x4b66a6
mov eax, dword [esi + 0x78]
shl ecx, 3
mov dword [esp + 0x20], ecx
push dword [eax + ecx]
push esi
call fcn.004b3720
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4b6a00
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x78]
movsx ecx, word [ecx + eax + 4]
movzx ecx, word [ebp + ecx*2 + 0x1a]
mov eax, dword [ecx + ebp + 0x18]
mov dword [esp + 0x20], eax
test eax, eax
je 0x4b66a6
push ebp
push esi
call fcn.004b39a0
push dword [esp + 0x28]
push esi
call fcn.004b3240
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x4b6a00
movzx ecx, word [esi + 0x7e]
mov eax, dword [esi + 0x78]
dec ecx
mov dword [esp + 0x34], ecx
lea ecx, [eax + ecx*8]
movzx eax, word [ecx + 4]
cmp ax, word [ebp + 0xc]
jge 0x4b66a6
inc eax
mov word [ecx + 4], ax
movzx eax, word [esi + 0x72]
push eax
push ebx
push dword [esi + 0x84]
call fcn.004b1ca0
mov dword [esi + 0x84], eax
add esp, 0xc
mov eax, dword [esp + 0x34]
test eax, eax
js 0x4b6922
nop dword [eax]
test ebx, ebx
je 0x4b6922
test ebp, ebp
je 0x4b66ea
push ebp
push esi
call fcn.004b39a0
mov eax, dword [esp + 0x3c]
add esp, 8
lea ecx, [eax*8]
mov eax, dword [esi + 0x78]
mov dword [esp + 0x18], ecx
push dword [eax + ecx]
push esi
call fcn.004b3720
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4b69ed
mov edx, dword [esi + 0x78]
add edx, dword [esp + 0x18]
movzx ecx, word [edx + 4]
mov eax, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov ax, word [ebp + 0xc]
cmp ax, word [esi + 0x76]
jae 0x4b674c
lea eax, [ebx + 8]
push eax
push dword [ebx + 4]
push dword [ebx]
push ecx
push ebp
push esi
call fcn.004b3630
add esp, 0x18
xor ebx, ebx
jmp 0x4b6911
mov ecx, dword [esp + 0x34]
xor eax, eax
mov word [esi + 0x7e], ax
test ecx, ecx
jle 0x4b68e9
push dword [edx - 8]
push esi
call fcn.004b3720
mov edi, eax
add esp, 8
test edi, edi
je 0x4b69c8
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x78]
movzx ecx, word [ecx + eax - 4]
mov eax, ecx
mov edx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
cmp cx, word [edi + 0xc]
jae 0x4b67b2
movzx eax, word [edi + eax*2 + 0x1c]
cmp dword [eax + edi + 0x18], 0
je 0x4b67ae
lea eax, [ecx + 1]
movzx eax, ax
mov dword [esp + 0x14], eax
jmp 0x4b67d9
mov eax, dword [esp + 0x20]
test cx, cx
je 0x4b68e9
movzx eax, word [edi + eax*2 + 0x18]
cmp dword [eax + edi + 0x18], 0
je 0x4b68e9
lea eax, [ecx - 1]
movzx edx, ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
cmp dx, ax
je 0x4b68e9
cmp dx, cx
jne 0x4b6818
mov eax, dword [esp + 0x14]
movzx eax, ax
mov dword [esp + 0x18], ebp
movzx eax, word [edi + eax*2 + 0x1a]
push dword [eax + edi + 0x18]
push esi
call fcn.004b3720
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x4b699c
mov ecx, dword [esp + 0x24]
mov edx, ebp
jmp 0x4b684c
movzx eax, dx
mov dword [esp + 0x14], ebp
movzx eax, word [edi + eax*2 + 0x1a]
push dword [eax + edi + 0x18]
push esi
call fcn.004b3720
mov edx, eax
add esp, 8
mov dword [esp + 0x18], edx
test edx, edx
je 0x4b699c
mov cx, word [edx + 0xc]
mov eax, ebp
inc cx
add cx, word [esp + 0x28]
movzx ecx, cx
mov dword [esp + 0x20], ecx
movzx ecx, cx
mov dword [esp + 0x28], ecx
movzx ecx, word [eax + 0xc]
movzx eax, word [edx + 0xc]
add ecx, eax
movzx eax, word [esi + 0x76]
lea eax, [eax*2 - 2]
cmp ecx, eax
jg 0x4b68cb
push dword [esp + 0x14]
push edx
push dword [esp + 0x24]
push edi
push esi
call fcn.004b0320
mov eax, dword [esp + 0x2c]
add esp, 0x14
movzx edx, word [eax + 0xc]
mov ecx, edx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
cmp dx, cx
jae 0x4b68a0
sub ecx, edx
dec ecx
lea edx, [ebx + 8]
movzx ecx, cx
push edx
push dword [ebx + 4]
push dword [ebx]
push ecx
mov ecx, dword [esp + 0x38]
cmp word [esp + 0x34], cx
cmovb eax, dword [esp + 0x24]
push eax
push esi
call fcn.004b3630
mov edx, dword [esp + 0x30]
add esp, 0x18
xor ebx, ebx
mov eax, dword [esp + 0x14]
cmp edx, ebp
cmovne eax, edx
push eax
push esi
call fcn.004b39a0
push edi
push esi
call fcn.004b39a0
add esp, 0x10
test ebx, ebx
je 0x4b6922
push dword [esp + 0x2c]
push ebx
push ebp
push esi
call fcn.004b3a90
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4b690b
push eax
call fcn.00470430
add esp, 4
mov edi, ebx
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x34]
sub eax, 1
mov dword [esp + 0x34], eax
jns 0x4b66d0
push ebp
push esi
call fcn.004b39a0
add esp, 8
test ebx, ebx
je 0x4b697e
push 0
push esi
call fcn.004b3920
mov edi, eax
add esp, 8
test edi, edi
je 0x4b6a00
lea eax, [ebx + 8]
push eax
push dword [ebx + 4]
push dword [ebx]
push 0
push edi
push esi
call fcn.004b3630
movzx ecx, word [edi + 0x1c]
mov eax, dword [esi + 0x68]
push edi
push esi
mov dword [ecx + edi + 0x18], eax
mov eax, dword [edi]
mov dword [esi + 0x68], eax
mov dword [esi + 0x58], 1
call fcn.004b39a0
add esp, 0x20
xor eax, eax
mov word [esi + 0x7e], ax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4b698f
push eax
call fcn.00470430
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
push ebp
push esi
call fcn.004b39a0
push edi
push esi
call fcn.004b39a0
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4b6a00
push eax
call fcn.00470430
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push ebp
push esi
call fcn.004b39a0
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x4b6a00
push eax
call fcn.00470430
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test edi, edi
je 0x4b69fa
push edi
call fcn.00470430
add esp, 4
xor eax, eax
mov word [esi + 0x7e], ax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret