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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov edx, dword [esp + 0x78]
lea eax, [esp + 0x4f]
mov ebp, dword [esp + 0x70]
test edx, edx
cmovne eax, dword [esp + 0x78]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x74]
lea edx, [eax - 0x38]
cmp edx, 0x21f
ja 0x4b193d
cmp ebp, 0x23f
ja 0x4b193d
mov eax, dword [0x5b39cc]
mov ecx, ebp
sar ecx, 5
mov esi, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
mov eax, dword [0x59ad30]
add esi, ecx
mov ecx, edx
sar ecx, 5
mov dword [esp + 0x34], esi
add ebx, ecx
mov dword [esp + 0x38], ebx
test byte [0x5bb334], 0xc
jne 0x4b18d4
lea ecx, [ebx - 3]
add ebx, 3
lea edi, [esi - 3]
add esi, 3
mov dword [esp + 0x1c], ebx
xor ebx, ebx
test edi, edi
cmovns ebx, edi
mov dword [esp + 0x20], ebx
xor ebx, ebx
test ecx, ecx
cmovns ebx, ecx
lea ecx, [eax - 1]
cmp eax, esi
cmovle esi, ecx
mov ecx, dword [0x59ad2c]
cmp ecx, dword [esp + 0x1c]
mov dword [esp + 0x3c], ebx
mov edi, ebx
lea ebx, [ecx - 1]
movsx ecx, word [0x5cca2a]
cmovg ebx, dword [esp + 0x1c]
add ecx, ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ecx
movsx ecx, word [0x5cca28]
add edx, ecx
mov dword [esp + 0x30], edx
cmp ebx, edi
jl 0x4b1906
mov dword [esp + 0x2c], 0
mov ebp, edi
mov edx, eax
lea esi, [esi]
imul edx, ebp
mov eax, dword [esp + 0x20]
add edx, eax
imul edx, edx, 0xe
add edx, dword [0x5b39d0]
mov edi, edx
cmp esi, eax
jl 0x4b18c0
mov ebx, eax
jmp 0x4b17ee
add ebx, 1
add edi, 0xe
cmp esi, ebx
jl 0x4b18c0
mov dword [esp], 0x41
mov ecx, edi
call fcn.00498de0
sub esp, 4
test eax, eax
je 0x4b17e0
movsx eax, word [edi + 6]
mov ecx, 0x5b5300
mov dword [esp], eax
call fcn.0050f960
sub esp, 4
test eax, eax
jne 0x4b17e0
movsx eax, word [edi + 6]
test eax, eax
jle 0x4b17e0
cmp eax, dword [0x5b5310]
jg 0x4b17e0
sub eax, 1
imul eax, dword [0x5b5314]
mov edx, dword [0x5b531d]
mov ecx, dword [edx + eax]
test ecx, ecx
je 0x4b17e0
mov eax, dword [ecx]
mov dword [esp + 0x24], ecx
call dword [eax + 0x30]
test eax, eax
jne 0x4b17e0
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
mov dword [esp], 0
call dword [eax + 0x2c]
movsx eax, word [0x5c71b6]
sub esp, 4
mov edx, dword [esp + 0x28]
cmp eax, edx
jg 0x4b17e0
movsx eax, word [0x5c71b4]
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jg 0x4b17e0
movsx eax, word [0x5c71b2]
cmp eax, edx
jl 0x4b17e0
movsx eax, word [0x5c71b0]
cmp eax, ecx
jl 0x4b17e0
mov eax, dword [esp + 0x78]
add ebx, 1
mov dword [esp + 0x2c], edi
add edi, 0xe
mov byte [eax], 0x41
cmp esi, ebx
jge 0x4b17ee
nop
add ebp, 1
cmp dword [esp + 0x1c], ebp
jl 0x4b18f0
mov edx, dword [0x59ad30]
jmp 0x4b17b8
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
mov dword [esp + 0x1c], ecx
mov esi, edi
jmp 0x4b1750
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4b1953
mov eax, dword [esp + 0x2c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov edx, dword [esp + 0x38]
imul edx, eax
add edx, dword [esp + 0x34]
imul edx, edx, 0xe
add edx, dword [0x5b39d0]
movzx eax, word [edx]
mov ecx, eax
and cx, 0xe00
cmp cx, 0x400
je 0x4b1abf
and ax, 0xf00
cmp ax, 0x300
je 0x4b1abf
mov dword [esp + 0x2c], 0
mov eax, dword [esp + 0x2c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov ecx, dword [0x59ad30]
mov edx, dword [esp + 0x38]
mov eax, dword [0x5b39d0]
imul edx, ecx
add edx, dword [esp + 0x34]
imul edx, edx, 0xe
add edx, eax
movzx ebx, word [edx]
mov ebp, ebx
and bp, 0xe00
cmp bp, 0x400
je 0x4b1abf
and bx, 0xf00
mov edi, dword [esp + 0x3c]
cmp bx, 0x300
je 0x4b1abf
lea esi, [esi]
nop
imul ecx, edi
mov edx, dword [esp + 0x20]
add ecx, edx
imul ecx, ecx, 0xe
lea ebp, [eax + ecx]
cmp esi, edx
jl 0x4b1aa2
mov dword [esp + 0x24], edi
mov ebx, edx
lea esi, [esi]
mov dword [esp], 0x4c
mov ecx, ebp
call fcn.00498de0
sub esp, 4
test eax, eax
jne 0x4b19ee
mov dword [esp], 0x53
mov ecx, ebp
call fcn.00498de0
sub esp, 4
test eax, eax
je 0x4b1a90
movsx eax, word [ebp + 4]
mov ecx, 0x5b5300
mov dword [esp], eax
call fcn.0050f960
sub esp, 4
test eax, eax
jne 0x4b1a90
movsx eax, word [ebp + 4]
test eax, eax
jle 0x4b1a90
cmp eax, dword [0x5b5310]
jg 0x4b1a90
sub eax, 1
imul eax, dword [0x5b5314]
mov edx, dword [0x5b531d]
mov edi, dword [edx + eax]
test edi, edi
je 0x4b1a90
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x30]
test eax, eax
jne 0x4b1a90
mov eax, dword [edi]
mov ecx, edi
mov dword [esp], 0
call dword [eax + 0x2c]
movsx eax, word [0x5c71b6]
sub esp, 4
mov edx, dword [esp + 0x28]
cmp eax, edx
jg 0x4b1a90
movsx eax, word [0x5c71b4]
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jg 0x4b1a90
movsx eax, word [0x5c71b2]
cmp eax, edx
jl 0x4b1a90
movsx eax, word [0x5c71b0]
cmp eax, ecx
jl 0x4b1a90
mov eax, dword [esp + 0x78]
mov dword [esp + 0x2c], ebp
mov byte [eax], 0x4c
lea esi, [esi]
add ebx, 1
add ebp, 0xe
cmp esi, ebx
jge 0x4b19c0
mov edi, dword [esp + 0x24]
add edi, 1
cmp dword [esp + 0x1c], edi
jl 0x4b18f8
mov eax, dword [0x5b39d0]
mov ecx, dword [0x59ad30]
jmp 0x4b19a0
mov eax, dword [esp + 0x78]
mov dword [esp + 0x2c], edx
mov byte [eax], 0x4c
mov eax, dword [esp + 0x2c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc