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

Disassembly:
mov ecx, dword [0xe11d80]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x521c2e
sub esp, 0x5c
mov ecx, dword [esp + 0x64]
nop
mov edx, dword [esp + 0x60]
test ecx, 0x80000000
je 0x5217dc
shl ecx, 1
mov ebx, edx
shl edx, 1
mov ebp, ebx
shr ebx, 0x1f
or ebx, ecx
mov ecx, ebx
shl ebx, 1
shr ecx, 0x1f
shr edx, 0x1f
or ebx, edx
add ebx, 0xd7b17f80
adc ecx, 0xd
jmp 0x5217e6
mov ebx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov ebp, edx
and ebp, 0x3fffffff
test ecx, ecx
jge 0x521823
mov edx, ebp
xchg ebp, ebx
neg ebx
xchg ebp, ebx
xor esi, esi
sub esi, ebx
mov edi, 0
sbb edi, ecx
test ebp, ebp
jge 0x521827
lea ebp, [edx - 0x3b9aca00]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
mov esi, 0xffffffff
sub esi, ebx
mov edi, 0xffffffff
sbb edi, ecx
jmp 0x521827
mov edi, ecx
mov esi, ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], edi
mov edx, dword [esp + 0x78]
test edx, edx
setl bl
sete al
mov esi, dword [esp + 0x74]
cmp esi, 0x3b9aca00
xchg edi, ebx
setb bl
xchg edi, ebx
and edi, eax
or ebx, edi
test bl, bl
jne 0x521860
xor eax, eax
jmp 0x5218a4
mov dword [esp + 4], 0
mov dword [esp], 0x3b9aca00
add esi, esi
adc edx, edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
call fcn.00460e00
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test ecx, ecx
sete cl
test eax, eax
sete al
and eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x78]
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x74]
test al, al
je 0x5218e3
mov ebx, dword [esp + 0x74]
test ebx, ebx
je 0x521c28
mov eax, ebp
cmp ebx, 0xffffffff
je 0x5218c0
cdq
idiv ebx
jmp 0x5218c2
neg eax
mov edx, eax
mov eax, ebp
mov ebp, edx
cmp ebx, 0xffffffff
je 0x5218d2
cdq
idiv ebx
jmp 0x5218d4
xor edx, edx
and ebp, 1
mov ebx, edx
sar edx, 0x1f
test ecx, ecx
jmp 0x521a3b
mov eax, dword [esp + 0x78]
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x3b9aca00
call fcn.00460e00
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test eax, eax
sete al
test ecx, ecx
sete cl
and eax, ecx
test al, al
jne 0x521988
mov eax, 0x3b9aca00
mov ecx, dword [esp + 0x2c]
mul ecx
mov ecx, eax
mov eax, dword [esp + 0x28]
mov ebx, 0x3b9aca00
mov ebp, edx
mul ebx
add eax, 0
adc edx, ecx
cmp ecx, edx
jbe 0x52194b
add ebp, 1
mov ecx, 0
adc ecx, 0
jmp 0x52194d
xor ecx, ecx
mov ebx, dword [esp + 0x30]
mov esi, ebx
sar ebx, 0x1f
add esi, eax
adc ebx, edx
cmp ebx, edx
setb dl
xchg edi, ebx
sete bl
xchg edi, ebx
cmp esi, eax
setb al
and eax, edi
or eax, edx
test al, al
je 0x521979
add ebp, 1
adc ecx, 0
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
mov edi, eax
jmp 0x521a8f
mov eax, dword [esp + 0x78]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x74]
mov dword [esp], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x3b9aca00
call fcn.00460ca0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x40], ecx
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], edx
mov ebx, dword [esp + 0x28]
mov dword [esp], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
call fcn.00460ca0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 8], ecx
call fcn.00460e00
mov eax, dword [esp + 0x10]
mov ecx, eax
mov eax, 0x3b9aca00
mul ecx
mov ecx, dword [esp + 0x14]
imul ecx, ecx, 0x3b9aca00
add edx, ecx
mov ecx, dword [esp + 0x30]
mov ebx, ecx
sar ecx, 0x1f
mov ebp, dword [esp + 0x50]
and ebp, 1
add ebx, eax
adc edx, ecx
mov eax, dword [esp + 0x18]
test eax, eax
mov esi, dword [esp + 0x74]
jge 0x521a60
test ebx, ebx
setne al
test edx, edx
setne cl
or ecx, eax
test cl, cl
je 0x521a5a
xor ebp, 1
sub esi, ebx
mov eax, dword [esp + 0x78]
sbb eax, edx
jmp 0x521a64
mov eax, edx
mov esi, ebx
jmp 0x521a64
mov eax, edx
mov esi, ebx
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x84], eax
mov dword [esp + 0x80], esi
add esp, 0x5c
ret
mov dword [esp + 0x34], edx
mov eax, dword [esp + 0x3c]
shl eax, 1
shr edx, 0x1f
or eax, edx
mov edx, dword [esp + 0x34]
shl edx, 1
mov dword [esp + 0x3c], eax
shr eax, 0x1f
cmp eax, 1
jne 0x521a7a
mov eax, dword [esp + 0x74]
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0x48], eax
xor eax, eax
mov dword [esp + 0x44], eax
jmp 0x521af3
mov ecx, ebp
shr ebp, 1
shr edi, 1
shl ecx, 0x1f
mov ebx, edx
and ebx, 1
shl ebx, 0x1f
shr edx, 1
shl eax, 0x1f
or ecx, edi
or ebx, ebp
or edx, eax
mov eax, dword [esp + 0x3c]
shr eax, 1
mov edi, dword [esp + 0x78]
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x3c], eax
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x20], ecx
cmp edx, ebp
xchg edi, ebx
setb bl
xchg edi, ebx
mov eax, dword [esp + 0x3c]
cmp eax, ecx
sete al
setb cl
and edi, eax
or edi, ecx
xchg edi, eax
test al, al
xchg edi, eax
jne 0x521b4e
cmp edx, ebp
sete cl
and ecx, eax
test cl, cl
je 0x521bac
mov dword [esp + 0x34], edx
mov eax, dword [esp + 0x48]
cmp eax, ebx
setb cl
xchg edi, ebx
sete bl
xchg edi, ebx
mov edx, dword [esp + 0x44]
cmp edx, esi
setbe al
and eax, edi
or eax, ecx
test al, al
je 0x521b9c
mov edx, dword [esp + 0x34]
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x44]
mov ecx, esi
sub esi, eax
mov edi, dword [esp + 0x48]
sbb ebx, edi
mov edi, dword [esp + 0x24]
cmp edi, ebx
xchg edi, ebx
setb bl
xchg edi, ebx
sete al
cmp esi, ecx
seta cl
and ecx, eax
or ecx, edi
test cl, cl
je 0x521b89
add ebp, 0xffffffff
mov ecx, dword [esp + 0x20]
adc ecx, 0xffffffff
jmp 0x521b8d
mov ecx, dword [esp + 0x20]
sub ebp, edx
mov eax, dword [esp + 0x3c]
sbb ecx, eax
mov edi, 1
jmp 0x521bb6
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
xor edi, edi
jmp 0x521bb6
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
xor edi, edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x1c], ebp
test edx, edx
xchg edi, ebx
sete bl
xchg edi, ebx
test eax, eax
sete cl
and edi, ecx
xchg edi, eax
test al, al
xchg edi, eax
je 0x521c02
mov ecx, dword [esp + 0x74]
mov edi, dword [esp + 0x44]
cmp ecx, edi
sete cl
mov ebx, dword [esp + 0x78]
mov ebp, dword [esp + 0x48]
cmp ebx, ebp
sete bl
and ecx, ebx
test cl, cl
je 0x521ab1
jmp 0x521c0f
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
jmp 0x521ab1
mov eax, dword [esp + 0x18]
test eax, eax
mov ebp, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
mov ebx, esi
mov esi, dword [esp + 0x74]
jmp 0x521a3b
call fcn.00437ac0
nop
call fcn.00468280
jmp fcn.00521790