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

Disassembly:
sub esp, 0xdc4
mov eax, dword [0x60bd28]
xor eax, esp
mov dword [esp + 0xdc0], eax
mov eax, dword [esp + 0xdd0]
mov ecx, dword [esp + 0xdd4]
mov edx, dword [esp + 0xdd8]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xdec]
xor ebx, ebx
mov dword [eax], ebx
mov esi, dword [0x596418]
mov di, word [0x59641c]
push 0x2c
mov dword [esp + 0x24], eax
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0xdf4]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0xdf8]
lea eax, [esp + 0x92]
push ebx
push eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], edx
mov byte [esp + 0x1e], bl
mov dword [esp + 0x94], esi
mov word [esp + 0x98], di
call fcn.0053fd60
push 0x2c
lea ecx, [esp + 0xd0]
push ebx
push ecx
mov dword [esp + 0xd2], esi
mov word [esp + 0xd6], di
call fcn.0053fd60
mov esi, dword [0x596410]
mov di, word [0x596414]
push 0x2c
lea edx, [esp + 0x10e]
push ebx
push edx
mov dword [esp + 0x110], esi
mov word [esp + 0x114], di
call fcn.0053fd60
mov eax, dword [0x596404]
mov ecx, dword [0x596408]
mov dl, byte [0x59640c]
push 0x29
mov dword [esp + 0x146], eax
lea eax, [esp + 0x14f]
push ebx
push eax
mov dword [esp + 0x152], ecx
mov byte [esp + 0x156], dl
call fcn.0053fd60
mov ecx, dword [0x5963fc]
mov dx, word [0x596400]
mov al, byte [0x596402]
push 0x2b
mov dword [esp + 0x184], ecx
lea ecx, [esp + 0x18b]
push ebx
push ecx
mov word [esp + 0x190], dx
mov byte [esp + 0x192], al
call fcn.0053fd60
push 0x2c
lea edx, [esp + 0x1c8]
push ebx
push edx
mov dword [esp + 0x1ca], esi
mov word [esp + 0x1ce], di
call fcn.0053fd60
mov eax, 0x1b
add esp, 0x48
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], 0x22
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], 0x1a
mov esi, dword [esp + 0xddc]
mov edi, dword [esp + 0xdd8]
mov eax, 0x14
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov eax, 0x5184c
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], eax
mov eax, 0x66666666
mov dword [esp + 0x218], eax
mov dword [esp + 0x21c], eax
mov dword [esp + 0x220], eax
mov dword [esp + 0x224], eax
mov dword [esp + 0x228], eax
mov dword [esp + 0x22c], eax
mov dword [esp + 0x230], eax
mov dword [esp + 0x234], eax
mov dword [esp + 0x218], eax
mov dword [esp + 0x21c], eax
mov dword [esp + 0x220], eax
mov dword [esp + 0x224], eax
mov dword [esp + 0x228], eax
mov dword [esp + 0x22c], eax
mov dword [esp + 0x230], eax
mov dword [esp + 0x234], eax
lea eax, [esp + 0x1b4]
push eax
push 0x20
push ebx
push 4
push esi
push edi
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x84], 0x3c
mov dword [esp + 0x44], 0x57e3f
mov dword [esp + 0x48], 0x521f7
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
call fcn.00406120
lea ecx, [esp + 0x230]
push ecx
push 0x20
push esi
push edi
mov dword [esp + 0x3c], eax
xor ebp, ebp
call fcn.00406030
mov ecx, dword [esp + 0x250]
mov edx, 1
add esp, 0x28
cmp eax, edx
jne 0x408d43
test byte [esp + 0x21a], 0x10
je 0x408d2e
mov esi, dword [esp + 0x20]
mov dword [esi], edx
cmp dword [esp + 0x14], edx
je 0x408d49
cmp ch, 0x61
je 0x408d3e
cmp ch, 0x60
jne 0x408d43
mov ebp, 9
cmp dword [esp + 0x14], edx
jne 0x408d60
mov ecx, 8
lea esi, [esp + 0x1b4]
lea edi, [esp + 0x218]
rep movsd dword es:[edi], dword [esi]
jmp 0x408d68
cmp eax, edx
jne 0x408fc2
mov cl, byte [esp + ebp + 0x220]
mov al, byte [esp + ebp + 0x222]
mov dl, byte [esp + ebp + 0x221]
movzx esi, al
movzx edi, cl
mov eax, edi
imul eax, eax, 0x64
mov byte [esp + 0x13], dl
movzx edx, dl
add eax, edx
imul eax, eax, 0x64
add eax, esi
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
mov dword [edx], eax
mov eax, esi
cdq
mov ebx, 0xa
idiv ebx
cmp cl, 0x60
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x48], edx
mov dword [eax], edx
je 0x408dc6
cmp cl, 0x61
jne 0x408f5a
lea eax, [esp + ebp + 0x224]
mov dword [esp + 0x44], eax
movzx eax, byte [eax]
mov edx, eax
lea ecx, [esp + ebp + 0x225]
shl edx, 4
sub edx, eax
movzx eax, byte [ecx]
mov dword [esp + 0x54], ecx
lea ecx, [eax + edx*4]
movzx edx, byte [esp + ebp + 0x226]
imul ecx, ecx, 0x4b
mov eax, dword [esp + 0x1c]
lea ebp, [esp + ebp + 0x226]
add ecx, edx
mov dword [eax], ecx
lea ecx, [esp + 0x1c]
push 0xac
push ecx
mov byte [esp + 0x1a], 1
call fcn.004082b0
mov edx, dword [esp + 0x1c]
mov eax, dword [eax]
push esi
push edx
push edi
mov edi, dword [esp + 0x64]
push eax
push str._s__code__02dm_02ds_02df_
push edi
call fcn.00540420
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0x20
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408e56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor esi, esi
xor bl, bl
xor ecx, ecx
lea esp, [esp]
mov dl, byte [esp + 0x13]
cmp byte [ecx + 0x5f74e1], dl
jne 0x408ea2
movzx edx, byte [ecx + str._King_Pro_Mediatek]
mov eax, 0x66666667
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, dword [esp + 0x18]
jne 0x408ea2
lea eax, [ecx + 0x5f74e3]
mov edx, edi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x408e94
mov bl, 1
add esi, 1
mov ecx, esi
imul ecx, ecx, 0x83
cmp byte [ecx + 0x5f74e0], 0
je 0x408ebf
test bl, bl
je 0x408e60
jmp 0x408f5a
test bl, bl
jne 0x408f5a
mov ecx, dword [esp + 0x20]
cmp dword [ecx], 0
je 0x408f5a
lea ebx, [esp + 0x88]
mov edx, ebx
sub edi, edx
xor esi, esi
mov eax, dword [esp + 0x14]
cmp dword [esp + esi + 0x70], eax
jne 0x408f4c
mov ecx, dword [esp + esi + 0x58]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, dword [esp + 0x18]
jne 0x408f4c
mov edx, dword [esp + 0x44]
movzx eax, byte [edx]
mov ecx, dword [esp + esi + 0x28]
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [esp + 0x54]
movzx eax, byte [eax]
lea edx, [eax + edx*4]
movzx eax, byte [ebp]
imul edx, edx, 0x4b
add edx, eax
cmp ecx, edx
je 0x408f33
test ecx, ecx
jne 0x408f4c
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x24]
mov dword [edx], ecx
mov eax, ebx
nop
mov cl, byte [eax]
mov byte [edi + eax], cl
add eax, 1
test cl, cl
jne 0x408f40
add esi, 4
sub edi, 0x32
add ebx, 0x32
cmp esi, 0x18
jl 0x408ee1
mov eax, dword [esp + 0x228]
and eax, 0xf
cmp eax, 6
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 2
mov dword [esp + 0x30], 4
mov dword [esp + 0x34], 6
mov dword [esp + 0x38], 0xa
mov dword [esp + 0x3c], 0x10
mov dword [esp + 0x40], 0x18
jle 0x408fa6
mov eax, 6
mov eax, dword [esp + eax*4 + 0x28]
mov edx, dword [esp + 0x4c]
xor ecx, ecx
test eax, eax
setle cl
sub ecx, 1
and ecx, eax
mov al, byte [esp + 0x12]
mov dword [edx], ecx
jmp 0x408fc4
mov al, bl
mov ecx, dword [esp + 0xdd0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0053fab2
add esp, 0xdc4
ret