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

Disassembly:
sub esp, 0x34
push ebx
push ebp
mov ebp, dword [esp + 0x50]
push esi
mov esi, ecx
movsx ecx, ax
mov ebx, edx
mov edx, dword [0x3368dc]
cmp ecx, edx
push edi
jle 0x54899
movsx edi, word [esp + 0x4c]
cmp edi, edx
jle 0x54899
movsx edi, word [esp + 0x54]
cmp edi, edx
jle 0x54899
movsx edi, bx
cmp edi, edx
jg 0x54ede
movsx edi, word [esp + 0x48]
mov edx, dword [0x3368e0]
cmp edi, edx
jle 0x548c3
movsx edi, word [esp + 0x50]
cmp edi, edx
jle 0x548c3
movsx edi, bp
cmp edi, edx
jle 0x548c3
movsx edi, si
cmp edi, edx
jg 0x54ede
mov edx, dword [0x3368d4]
cmp ecx, edx
jge 0x548ea
movsx ecx, word [esp + 0x4c]
cmp ecx, edx
jge 0x548ea
movsx ecx, word [esp + 0x54]
cmp ecx, edx
jge 0x548ea
movsx ecx, bx
cmp ecx, edx
jl 0x54ede
movsx ecx, word [esp + 0x48]
mov edi, dword [0x3368d8]
cmp ecx, edi
jge 0x54914
movsx ecx, word [esp + 0x50]
cmp ecx, edi
jge 0x54914
movsx ecx, bp
cmp ecx, edi
jge 0x54914
movsx ecx, si
cmp ecx, edi
jl 0x54ede
cmp edi, dword [0x3368e0]
jge 0x54ede
cmp edx, dword [0x3368dc]
jge 0x54ede
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push esi
push ebx
push ebp
push edx
mov edx, dword [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x90]
push ecx
mov ecx, dword [esp + 0x90]
call fcn.0004e670
add esp, 0x34
test ax, ax
je 0x54ede
movsx esi, word [0x4530e0]
cmp esi, edi
jge 0x549a3
jmp 0x54990
call fcn.0004e560
test ax, ax
jne 0x54ede
inc esi
cmp esi, edi
jl 0x54990
cmp word [0x33679c], 0
jne 0x54c5f
cmp word [0x3368f8], 0
jne 0x54c5f
movsx eax, word [0x4530fa]
cmp esi, eax
mov dword [esp + 0x18], esi
jg 0x54ede
shl esi, 0xa
mov dword [esp + 0x1c], esi
lea esp, [esp]
movsx ebx, word [0x2a8e12]
movsx ecx, word [0x2a8e36]
cmp ebx, ecx
mov dword [esp + 0x10], ebx
jl 0x54c23
sub ebx, ecx
mov ebp, dword [0x2a8e14]
mov edx, dword [0x2a8e38]
mov edi, ebp
mov dword [esp + 0x14], edx
jne 0x54a15
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
lea edx, [esi + esi]
mov dword [esp + 0x30], edx
lea edx, [eax + eax]
mov dword [esp + 0x34], edx
jge 0x54a65
mov edx, ebx
sub edx, ecx
mov edi, edx
imul edx, eax
imul edi, esi
mov ecx, ebx
mov ebx, dword [0x2a8e38]
add edi, ebp
add edx, ebx
mov dword [esp + 0x14], edx
mov ebx, dword [esp + 0x10]
mov edx, dword [0x3368dc]
dec ebx
cmp edx, ebx
mov dword [esp + 0x10], ebx
jge 0x54a7c
mov dword [esp + 0x10], edx
cmp ecx, dword [esp + 0x10]
jge 0x54bbc
movsx edx, word [0x453104]
movsx ebx, word [0x453102]
movsx ebp, word [0x453100]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x14]
add esi, edi
add eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], 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 + 0x28], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x38], ecx
jmp 0x54ae0
mov ebx, dword [esp + 0x28]
lea ecx, [ecx]
movsx ecx, word [0x453106]
sar eax, 0x10
cdq
idiv ecx
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], ecx
mov ecx, edx
mov edx, dword [0x4530e4]
add ecx, eax
mov eax, dword [esp + 0x24]
sar eax, 0x10
add ecx, edx
cdq
idiv ebx
mov eax, dword [0x4530dc]
shl ecx, 0xa
add ecx, ebp
mov ebp, dword [0x4530e4]
add edx, ecx
add edx, eax
mov eax, dword [0x653190]
movzx ecx, word [eax + edx*2]
mov eax, dword [esp + 0x14]
sar eax, 0x10
cdq
idiv dword [esp + 0x2c]
shl ecx, 0x10
mov eax, edx
add eax, ebp
shl eax, 0xa
mov dword [esp + 0x2c], eax
mov eax, edi
sar eax, 0x10
cdq
idiv ebx
movsx ebp, word [0x453100]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x40]
add eax, ebp
add edx, eax
movsx eax, word [0x453104]
add edx, eax
mov dword [esp + 0x20], eax
add edx, dword [0x4530dc]
mov eax, dword [0x653190]
movzx edx, word [eax + edx*2]
or ecx, edx
mov eax, ecx
call fcn.0004c040
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
add ecx, eax
add edi, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3c]
add eax, ecx
add ebx, 4
dec esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
jne 0x54ad9
mov ecx, dword [esp + 0x38]
cmp ecx, dword [esp + 0x10]
jne 0x54c23
mov eax, dword [esp + 0x14]
movsx esi, word [0x453106]
sar eax, 0x10
cdq
idiv esi
mov eax, dword [0x4530e4]
movsx esi, word [0x453104]
mov ebp, dword [0x4530dc]
add edx, eax
add esi, edx
mov eax, edi
movsx edi, word [0x453102]
sar eax, 0x10
cdq
idiv edi
mov eax, dword [esp + 0x1c]
movsx edi, word [0x453100]
add ecx, eax
mov eax, dword [0x653190]
shl esi, 0xa
add edx, ebp
add edx, esi
add edi, edx
lea edx, [eax + ecx*2]
mov ax, word [eax + edi*2]
push edx
call fcn.0004ba90
add esp, 4
call fcn.0004e560
test ax, ax
jne 0x54ede
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
movsx eax, word [0x4530fa]
inc ecx
add esi, 0x400
cmp ecx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], esi
jle 0x549e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
movsx eax, word [0x4530fa]
cmp esi, eax
mov dword [esp + 0x18], esi
jg 0x54ede
shl esi, 0xa
mov dword [esp + 0x1c], esi
lea esp, [esp]
movsx edi, word [0x2a8e12]
movsx ecx, word [0x2a8e36]
cmp edi, ecx
mov dword [esp + 0x10], edi
jl 0x54eae
sub edi, ecx
mov ebp, dword [0x2a8e14]
mov eax, dword [0x2a8e38]
mov ebx, ebp
mov dword [esp + 0x14], eax
jne 0x54cb4
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
lea edx, [esi + esi]
mov dword [esp + 0x30], edx
lea edx, [eax + eax]
mov dword [esp + 0x34], edx
jge 0x54d04
mov edx, edi
sub edx, ecx
mov ebx, edx
imul edx, eax
imul ebx, esi
mov ecx, edi
mov edi, dword [0x2a8e38]
add ebx, ebp
add edx, edi
mov dword [esp + 0x14], edx
mov edi, dword [esp + 0x10]
mov edx, dword [0x3368dc]
dec edi
cmp edx, edi
mov dword [esp + 0x10], edi
jge 0x54d1b
mov dword [esp + 0x10], edx
cmp ecx, dword [esp + 0x10]
jge 0x54e4a
mov edx, dword [esp + 0x14]
movsx edi, word [0x453102]
movsx ebp, word [0x453100]
add esi, ebx
add eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], 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 + 0x28], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], ecx
jmp 0x54d71
mov edi, dword [esp + 0x28]
movsx ecx, word [0x453106]
sar eax, 0x10
cdq
idiv ecx
movsx eax, word [0x453104]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], ecx
mov ecx, edx
mov edx, dword [0x4530e4]
add ecx, eax
mov eax, dword [esp + 0x24]
sar eax, 0x10
add ecx, edx
cdq
idiv edi
mov eax, dword [0x653190]
shl ecx, 0xa
add ecx, ebp
mov ebp, dword [0x4530e4]
add edx, ecx
add edx, dword [0x4530dc]
movzx ecx, word [eax + edx*2]
mov eax, dword [esp + 0x14]
sar eax, 0x10
cdq
idiv dword [esp + 0x2c]
shl ecx, 0x10
mov eax, edx
add eax, dword [esp + 0x20]
add eax, ebp
shl eax, 0xa
mov dword [esp + 0x2c], eax
mov eax, ebx
sar eax, 0x10
cdq
idiv edi
movsx ebp, word [0x453100]
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x3c]
add eax, ebp
add edx, eax
add edx, dword [0x4530dc]
mov eax, dword [0x653190]
movzx edx, word [eax + edx*2]
or ecx, edx
mov eax, ecx
call fcn.0004bb30
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
add ecx, eax
add ebx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
add eax, ecx
add edi, 4
dec esi
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], edi
jne 0x54d6d
mov ecx, dword [esp + 0x38]
cmp ecx, dword [esp + 0x10]
jne 0x54eae
mov eax, dword [esp + 0x14]
movsx esi, word [0x453106]
sar eax, 0x10
cdq
idiv esi
movsx esi, word [0x453104]
mov ebp, dword [0x4530e4]
movsx edi, word [0x453102]
mov eax, ebx
sar eax, 0x10
mov ebx, dword [0x4530dc]
add edx, ebp
add esi, edx
cdq
idiv edi
mov eax, dword [esp + 0x1c]
shl esi, 0xa
add ecx, eax
mov eax, dword [0x653190]
lea edi, [eax + ecx*2]
add edx, ebx
movsx ebx, word [0x453100]
add edx, esi
add ebx, edx
mov ax, word [eax + ebx*2]
call fcn.0004b820
call fcn.0004e560
test ax, ax
jne 0x54ede
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
movsx eax, word [0x4530fa]
inc ecx
add esi, 0x400
cmp ecx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], esi
jle 0x54c80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret