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

Disassembly:
sub esp, 0x30
push ebx
push ebp
mov ebp, dword [esp + 0x4c]
push esi
mov esi, ecx
movsx ecx, ax
mov ebx, edx
mov edx, dword [0x3368dc]
cmp ecx, edx
push edi
jle 0x52bc9
movsx edi, word [esp + 0x48]
cmp edi, edx
jle 0x52bc9
movsx edi, word [esp + 0x50]
cmp edi, edx
jle 0x52bc9
movsx edi, bx
cmp edi, edx
jg 0x531d7
movsx edi, word [esp + 0x44]
mov edx, dword [0x3368e0]
cmp edi, edx
jle 0x52bf3
movsx edi, word [esp + 0x4c]
cmp edi, edx
jle 0x52bf3
movsx edi, bp
cmp edi, edx
jle 0x52bf3
movsx edi, si
cmp edi, edx
jg 0x531d7
mov edx, dword [0x3368d4]
cmp ecx, edx
jge 0x52c1a
movsx ecx, word [esp + 0x48]
cmp ecx, edx
jge 0x52c1a
movsx ecx, word [esp + 0x50]
cmp ecx, edx
jge 0x52c1a
movsx ecx, bx
cmp ecx, edx
jl 0x531d7
movsx ecx, word [esp + 0x44]
mov edi, dword [0x3368d8]
cmp ecx, edi
jge 0x52c44
movsx ecx, word [esp + 0x4c]
cmp ecx, edi
jge 0x52c44
movsx ecx, bp
cmp ecx, edi
jge 0x52c44
movsx ecx, si
cmp ecx, edi
jl 0x531d7
cmp edi, dword [0x3368e0]
jge 0x531d7
cmp edx, dword [0x3368dc]
jge 0x531d7
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x64]
push esi
push ebx
push ebp
push edx
mov edx, dword [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x8c]
call fcn.0004e670
add esp, 0x34
test ax, ax
je 0x531d7
movsx esi, word [0x4530e0]
cmp esi, edi
jge 0x52cd3
jmp 0x52cc0
call fcn.0004e560
test ax, ax
jne 0x531d7
inc esi
cmp esi, edi
jl 0x52cc0
movsx eax, word [esp + 0x7c]
movsx edx, word [esp + 0x78]
mov edi, dword [0x4530e4]
mov ecx, dword [0x4530dc]
shl eax, 0xa
add eax, edx
mov dword [esp + 0x1c], eax
movsx eax, word [0x453104]
add eax, edi
shl eax, 0xa
add eax, ecx
cmp word [0x33679c], 0
movsx ecx, word [0x453100]
lea edx, [ecx + eax*2]
mov dword [esp + 0x18], edx
jne 0x52f89
cmp word [0x3368f8], 0
jne 0x52f89
movsx eax, word [0x4530fa]
cmp esi, eax
mov dword [esp + 0x20], esi
jg 0x531d7
shl esi, 0xa
mov dword [esp + 0x24], esi
jmp 0x52d50
movsx ebx, word [0x2a8e12]
movsx ecx, word [0x2a8e36]
cmp ebx, ecx
mov dword [esp + 0x10], ebx
jl 0x52f4d
sub ebx, ecx
mov ebp, dword [0x2a8e14]
mov eax, dword [0x2a8e38]
mov edi, ebp
mov dword [esp + 0x14], eax
jne 0x52d84
mov ebx, 1
mov eax, dword [0x2a8e44]
sub eax, ebp
cdq
idiv ebx
mov edx, dword [0x2a8e38]
mov esi, eax
mov eax, dword [0x2a8e78]
sub eax, edx
cdq
idiv ebx
mov ebx, dword [0x3368d4]
cmp ecx, ebx
mov edx, eax
lea eax, [esi + esi]
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
jge 0x52dd3
mov eax, ebx
sub eax, ecx
mov edi, eax
imul eax, edx
imul edi, esi
mov ecx, ebx
mov ebx, dword [0x2a8e38]
add edi, ebp
add eax, ebx
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x10]
mov eax, dword [0x3368dc]
dec ebx
cmp eax, ebx
mov dword [esp + 0x10], ebx
jge 0x52de9
mov dword [esp + 0x10], eax
cmp ecx, dword [esp + 0x10]
jge 0x52ef1
mov eax, dword [esp + 0x14]
movsx ebp, word [0x453102]
add esi, edi
add eax, edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x28], esi
mov esi, dword [0x653190]
add edx, ecx
lea edx, [esi + edx*2]
mov esi, dword [esp + 0x10]
sub esi, ecx
dec esi
shr esi, 1
inc esi
lea ecx, [ecx + esi*2]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], ecx
mov edi, edi
movsx ecx, word [0x453106]
sar eax, 0x10
cdq
idiv ecx
mov eax, dword [esp + 0x28]
sar eax, 0x10
mov ebx, edx
cdq
idiv ebp
mov eax, dword [0x6533b4]
shl ebx, 0xb
add ebx, eax
mov eax, dword [esp + 0x18]
add edx, ebx
movzx edx, byte [edx + eax]
mov ebx, dword [esp + 0x1c]
mov eax, dword [0x653190]
add edx, ebx
movzx ebx, word [eax + edx*2]
mov eax, dword [esp + 0x14]
sar eax, 0x10
cdq
idiv ecx
mov eax, edi
sar eax, 0x10
shl ebx, 0x10
mov ecx, edx
cdq
idiv ebp
mov eax, dword [0x6533b4]
shl ecx, 0xb
add ecx, eax
mov eax, dword [esp + 0x18]
add edx, ecx
movzx ecx, byte [edx + eax]
add ecx, dword [esp + 0x1c]
mov edx, dword [0x653190]
movzx eax, word [edx + ecx*2]
or eax, ebx
mov ebx, dword [esp + 0x3c]
call fcn.0004c040
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
add ecx, eax
add edi, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
lea ecx, [edx + edx]
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x38]
add eax, ecx
add ebx, 4
dec esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
jne 0x52e30
mov ecx, dword [esp + 0x34]
cmp ecx, dword [esp + 0x10]
jne 0x52f4d
mov eax, dword [esp + 0x14]
movsx esi, word [0x453106]
add eax, edx
sar eax, 0x10
cdq
idiv esi
mov eax, edi
movsx edi, word [0x453102]
sar eax, 0x10
mov ebp, dword [0x6533b4]
mov esi, edx
cdq
idiv edi
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
shl esi, 0xb
add esi, ebp
add edx, esi
movzx edx, byte [edx + eax]
mov eax, dword [esp + 0x24]
add ecx, eax
mov eax, dword [0x653190]
lea ecx, [eax + ecx*2]
add edx, edi
mov ax, word [eax + edx*2]
push ecx
call fcn.0004ba90
add esp, 4
call fcn.0004e560
test ax, ax
jne 0x531d7
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
movsx eax, word [0x4530fa]
inc ecx
add esi, 0x400
cmp ecx, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
jle 0x52d50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
movsx eax, word [0x4530fa]
cmp esi, eax
mov dword [esp + 0x20], esi
jg 0x531d7
shl esi, 0xa
mov dword [esp + 0x24], esi
jmp 0x52fb0
movsx edi, word [0x2a8e12]
movsx ecx, word [0x2a8e36]
cmp edi, ecx
mov dword [esp + 0x10], edi
jl 0x531a7
sub edi, ecx
mov ebp, dword [0x2a8e14]
mov edx, dword [0x2a8e38]
mov ebx, ebp
mov dword [esp + 0x14], edx
jne 0x52fe5
mov edi, 1
mov eax, dword [0x2a8e44]
sub eax, ebp
cdq
idiv edi
mov edx, dword [0x2a8e38]
mov esi, eax
mov eax, dword [0x2a8e78]
sub eax, edx
cdq
idiv edi
mov edi, dword [0x3368d4]
cmp ecx, edi
mov edx, eax
lea eax, [esi + esi]
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
jge 0x53034
mov eax, edi
sub eax, ecx
mov ebx, eax
imul eax, edx
imul ebx, esi
mov ecx, edi
mov edi, dword [0x2a8e38]
add ebx, ebp
add eax, edi
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x10]
mov eax, dword [0x3368dc]
dec edi
cmp eax, edi
mov dword [esp + 0x10], edi
jge 0x5304a
mov dword [esp + 0x10], eax
cmp ecx, dword [esp + 0x10]
jge 0x53151
mov eax, dword [esp + 0x14]
movsx ebp, word [0x453102]
add esi, ebx
add eax, edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x28], esi
mov esi, dword [0x653190]
add edx, ecx
lea edx, [esi + edx*2]
mov esi, dword [esp + 0x10]
sub esi, ecx
dec esi
shr esi, 1
inc esi
lea ecx, [ecx + esi*2]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], ecx
nop
movsx ecx, word [0x453106]
sar eax, 0x10
cdq
idiv ecx
mov eax, dword [esp + 0x28]
sar eax, 0x10
mov edi, edx
cdq
idiv ebp
mov eax, dword [0x6533b4]
shl edi, 0xb
add edi, eax
mov eax, dword [esp + 0x18]
add edx, edi
movzx edx, byte [edx + eax]
mov edi, dword [esp + 0x1c]
mov eax, dword [0x653190]
add edx, edi
movzx edi, word [eax + edx*2]
mov eax, dword [esp + 0x14]
sar eax, 0x10
cdq
idiv ecx
mov eax, ebx
sar eax, 0x10
shl edi, 0x10
mov ecx, edx
cdq
idiv ebp
mov eax, dword [0x6533b4]
shl ecx, 0xb
add ecx, eax
mov eax, dword [esp + 0x18]
add edx, ecx
movzx ecx, byte [edx + eax]
add ecx, dword [esp + 0x1c]
mov edx, dword [0x653190]
movzx eax, word [edx + ecx*2]
or eax, edi
mov edi, dword [esp + 0x38]
call fcn.0004bb30
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
add ecx, eax
add ebx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
lea ecx, [edx + edx]
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3c]
add eax, ecx
add edi, 4
dec esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edi
jne 0x53090
mov ecx, dword [esp + 0x34]
cmp ecx, dword [esp + 0x10]
jne 0x531a7
mov eax, dword [esp + 0x14]
movsx esi, word [0x453106]
add eax, edx
sar eax, 0x10
cdq
idiv esi
movsx edi, word [0x453102]
mov eax, ebx
sar eax, 0x10
mov ebx, dword [0x6533b4]
mov esi, edx
cdq
idiv edi
mov eax, dword [esp + 0x18]
shl esi, 0xb
add esi, ebx
add edx, esi
movzx edx, byte [edx + eax]
add edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
add ecx, eax
mov eax, dword [0x653190]
lea edi, [eax + ecx*2]
mov ax, word [eax + edx*2]
call fcn.0004b820
call fcn.0004e560
test ax, ax
jne 0x531d7
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
movsx eax, word [0x4530fa]
inc ecx
add esi, 0x400
cmp ecx, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
jle 0x52fb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret