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

Disassembly:
sub esp, 0x48
mov edx, dword [esp + 0x50]
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
push esi
mov esi, dword [esp + 0x60]
push edi
mov edi, ecx
mov ecx, dword [esp + 0x5c]
sub ebx, edx
sub esi, ecx
mov dword [esp + 0x10], ebx
cmp esi, 1
mov eax, 1
jl 0x521bed
mov eax, esi
push 8
lea ecx, [edi + 0x250]
push 1
push eax
mov dword [esp + 0x3c], ecx
call fcn.004ee100
cmp ebx, 1
mov eax, 1
jl 0x521c0d
mov eax, ebx
push 8
lea ecx, [edi + 0x294]
push eax
push 1
mov dword [esp + 0x40], ecx
call fcn.004ee100
push 8
lea ecx, [edi + 0x20c]
push ebx
push esi
mov dword [esp + 0x20], ecx
call fcn.004ee100
mov eax, dword [edi + 0x200]
mov ecx, dword [edi + 0x208]
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x204]
mov edx, eax
mov edi, ecx
and edx, 0xff
and edi, 0xff
mov dword [esp + 0x40], edx
xor edx, edx
mov dl, ch
xor ebx, ebx
mov ebp, edx
xor edx, edx
mov dl, ah
and ebp, 0xff
shr eax, 0x10
shr ecx, 0x10
and eax, 0xff
and ecx, 0xff
mov dword [esp + 0x38], eax
mov eax, ecx
neg eax
mov dword [esp + 0x4c], eax
mov eax, ebp
neg eax
mov dword [esp + 0x48], eax
mov eax, edi
and edx, 0xff
mov dword [esp + 0x5c], ebx
neg eax
shl ecx, 7
shl ebp, 7
shl edi, 7
mov dword [esp + 0x3c], edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
add eax, ecx
mov ecx, dword [esp + 0x28]
cdq
and edx, 0x7f
add eax, edx
mov edx, dword [esp + 0x24]
mov edi, eax
mov eax, dword [esp + 0x1c]
add eax, edx
cdq
and edx, 0x7f
add eax, edx
mov edx, dword [esp + 0x2c]
mov ebp, eax
lea eax, [ecx + edx]
mov ecx, dword [esp + 0x14]
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0x5c]
sar ebx, 7
sar ebp, 7
sar edi, 7
push ebx
push ebp
push edi
push eax
call fcn.004ee3f0
mov ecx, dword [esp + 0x5c]
push ebx
push ebp
push edi
push ecx
mov ecx, dword [esp + 0x40]
call fcn.004ee3f0
mov ecx, dword [esp + 0x34]
push ebx
push ebp
push edi
mov edi, dword [esp + 0x68]
push edi
call fcn.004ee3f0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x44]
add ebx, edx
mov edx, dword [esp + 0x48]
add eax, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
add ebp, edx
mov edx, dword [esp + 0x2c]
inc edi
add ebx, eax
add edx, ecx
cmp edi, 0x81
mov dword [esp + 0x5c], edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], edx
jl 0x521ccc
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x38]
xor edx, edx
mov ecx, eax
mov dl, ah
and ecx, 0xff
shr eax, 0x10
and eax, 0xff
and edx, 0xff
mov dword [esp + 0x54], eax
mov dword [esp + 0x18], eax
mov eax, edi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x3c]
neg eax
mov dword [esp + 0x38], eax
mov eax, edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x5c], 1
neg eax
mov dword [esp + 0x44], eax
mov eax, ecx
neg eax
mov dword [esp + 0x48], eax
mov eax, edi
shl eax, 7
sub eax, edi
mov dword [esp + 0x1c], eax
mov eax, edx
shl eax, 7
sub eax, edx
mov dword [esp + 0x20], eax
mov eax, ecx
shl eax, 7
sub eax, ecx
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
add eax, edx
mov ecx, dword [esp + 0x20]
cdq
and edx, 0x7f
add eax, edx
mov edx, dword [esp + 0x28]
mov edi, eax
lea eax, [ecx + edx]
mov ecx, dword [esp + 0x18]
cdq
and edx, 0x7f
add eax, edx
mov ebp, eax
mov eax, dword [esp + 0x1c]
add eax, ecx
mov ecx, dword [esp + 0x14]
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
mov al, byte [esp + 0x5c]
sar ebx, 7
sar ebp, 7
sar edi, 7
push ebx
add al, 0x7f
push ebp
push edi
push eax
mov byte [esp + 0x50], al
call fcn.004ee3f0
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
push ebx
push ebp
push edi
push edx
call fcn.004ee3f0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x34]
push ebx
push ebp
push edi
push eax
call fcn.004ee3f0
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x4c]
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x5c]
add ebx, ecx
mov ecx, dword [esp + 0x48]
add edi, edx
mov edx, dword [esp + 0x24]
add edx, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x18]
add ebp, edx
mov edx, dword [esp + 0x54]
inc eax
add ebx, ecx
add edi, edx
cmp eax, 0x81
mov dword [esp + 0x5c], eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jl 0x521e27
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x14]
and eax, 0xff
push eax
push ecx
mov ecx, ebp
call fcn.004ee270
mov edi, dword [esp + 0x30]
mov ecx, edi
call fcn.004ee230
mov ecx, edi
mov ebx, eax
call fcn.004ee250
xor ecx, ecx
test eax, eax
jle 0x521f55
mov edx, ecx
and edx, 0x80000001
jns 0x521f4b
dec edx
or edx, 0xfffffffe
inc edx
neg dl
mov byte [ebx + ecx], dl
inc ecx
cmp ecx, eax
jl 0x521f3c
mov ebx, dword [esp + 0x34]
mov ecx, ebx
call fcn.004ee230
mov ecx, ebx
mov edi, eax
call fcn.00538bc0
xor ecx, ecx
test eax, eax
jle 0x521f8a
mov edx, ecx
and edx, 0x80000001
jns 0x521f7e
dec edx
or edx, 0xfffffffe
inc edx
neg dl
mov byte [edi], dl
add edi, 4
inc ecx
cmp ecx, eax
jl 0x521f6f
mov ecx, ebp
call fcn.004ee260
mov ecx, ebp
mov dword [esp + 0x78], eax
call fcn.004ee230
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x20], eax
and ecx, 0xff
mov edi, eax
mov dword [esp + 0x18], ecx
mov ebx, 1
lea eax, [ecx + ecx]
cmp eax, 1
jl 0x521fbf
mov ebx, eax
mov eax, 0x7fff
cdq
idiv ebx
mov edx, dword [esp + 0x6c]
add edx, 0xfffffff9
mov dword [esp + 0x74], eax
mov eax, 0xff
sub eax, ecx
cmp edx, 8
mov dword [esp + 0x2c], eax
ja 0x522839
jmp dword [edx*4 + 0x438c44]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 0x20