Function at 0x4039d0
Capabilities:
Check for time delay via queryperformancecounter
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xa4
push ebx
push esi
push edi
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov ecx, dword [0x7299fc]
call fcn.006665b0
fld dword [ebp + 0xc]
fmul dword [0x6bdb30]
mov dword [esp + 0x38], eax
call fcn.00666390
mov edi, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, edi
call fcn.00403970
mov esi, dword [edi + 8]
mov dword [esp + 0x24], 0
jmp 0x403a30
lea eax, [edi + 8]
cmp esi, eax
je 0x403b35
mov ebx, dword [esi + 0x10]
cmp ebx, 1
mov ecx, dword [esi]
mov dword [esp + 0x18], ecx
jne 0x403a58
mov edx, dword [ebp + 0xc]
push 0
push edx
push esi
push edi
call fcn.00402cb0
jmp 0x403a64
test ebx, ebx
je 0x403a64
mov dword [esp + 0x24], 1
mov eax, dword [esi + 0x14]
mov dword [esp + 0x10], eax
fld dword [esp + 0x10]
fcomp dword [0x6bda00]
fnstsw ax
test ah, 0x44
jnp 0x403b25
cmp ebx, 1
je 0x403a8d
test ebx, ebx
jne 0x403b25
fld dword [esp + 0x10]
fsub dword [ebp + 0xc]
fst dword [esp + 0x10]
fcomp dword [0x6bda00]
fnstsw ax
test ah, 0x41
jp 0x403b1e
test ebx, ebx
mov eax, dword [esi + 0x1c]
jne 0x403abd
fld dword [eax + 0x20]
mov ebx, 1
fst dword [esp + 0x1c]
fld dword [eax + 0x24]
jmp 0x403ac9
fld dword [eax + 0x28]
xor ebx, ebx
fst dword [esp + 0x1c]
fld dword [eax + 0x2c]
fld st(1)
fcomp dword [0x6bda00]
fnstsw ax
test ah, 0x44
jnp 0x403b0d
fmul st(1)
lea edx, [esi + 0x24]
fstp dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
push ecx
fstp st(0)
call fcn.00401f10
fld dword [esp + 0x20]
fsub dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x10], ebx
mov dword [esi + 0x18], 0
faddp st(1)
fadd dword [esp + 0x10]
fstp dword [esi + 0x14]
jmp 0x403b25
fstp st(0)
mov dword [esi + 0x10], ebx
fstp dword [esi + 0x14]
mov dword [esi + 0x18], 0
jmp 0x403b25
mov edx, dword [esp + 0x10]
mov dword [esi + 0x14], edx
mov eax, dword [esp + 0x24]
test eax, eax
mov esi, dword [esp + 0x18]
je 0x403a30
cmp dword [0x76c3f0], 3
jne 0x403c78
mov esi, dword [0x780494]
mov eax, 0x780494
call fcn.0058a1c0
cmp esi, eax
mov dword [esp + 0x30], eax
je 0x403c78
mov edi, edi
fld dword [esi + 0x90]
mov ecx, dword [esi + 0xe4]
fmul dword [0x6bdcc0]
mov eax, dword [esi + 0xe0]
mov edx, dword [esi + 0xe8]
mov dword [esp + 0x80], ecx
fstp dword [esp + 0x14]
mov dword [esp + 0x70], eax
fld dword [esi + 0x94]
mov eax, dword [esi + 0xec]
fmul dword [0x6bdcc0]
mov dword [esp + 0x90], edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0xa0], eax
fstp dword [esp + 0x1c]
lea eax, [esi + 0xa0]
fld dword [esi + 0x98]
mov ecx, dword [esp + 0x1c]
fmul dword [0x6bdcc0]
fstp dword [esp + 0x34]
fld dword [esi + 0x9c]
mov edi, dword [esp + 0x34]
fmul dword [0x6bdcc0]
fstp dword [esp + 0x18]
fld dword [esi + 0xf0]
mov ebx, dword [esp + 0x18]
fmul dword [0x6bdf7c]
push ebx
push edi
push ecx
fstp dword [esp + 0x80]
push edx
fld dword [esi + 0xf4]
push eax
fmul dword [0x6bdf7c]
lea ecx, [esi + 0x100]
push ecx
fstp dword [esp + 0x9c]
fld dword [esi + 0xf8]
fmul dword [0x6bdf7c]
fstp dword [esp + 0xac]
fld dword [esi + 0xfc]
fmul dword [0x6bdf7c]
fstp dword [esp + 0xbc]
call fcn.004024e0
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
push ebx
push edi
push edx
push eax
lea ecx, [esp + 0x98]
push ecx
lea edx, [esi + 0x140]
push edx
call fcn.004024e0
mov esi, dword [esi]
mov eax, dword [esp + 0x60]
add esp, 0x30
cmp esi, eax
jne 0x403b60
mov edi, dword [ebp + 8]
mov ebx, dword [edi]
mov eax, edi
mov dword [esp + 0x1c], ebx
call fcn.0058a1c0
cmp ebx, eax
mov dword [esp + 0x48], eax
je 0x404012
jmp 0x403c97
mov ebx, dword [esp + 0x1c]
mov esi, dword [ebx + 8]
mov cl, byte [esi + 0x1a]
mov edi, dword [ebx]
mov eax, 1
shl eax, cl
mov cl, byte [esi + 0x19]
mov edx, 1
shl edx, cl
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], esi
imul eax, edx
dec eax
mov dword [esp + 0x60], eax
mov al, byte [esi + 0x1b]
test al, al
je 0x403ce3
movsx eax, al
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fdivr dword [0x6bdb30]
call fcn.00666390
mov dword [esp + 0x2c], eax
jmp 0x403ceb
mov dword [esp + 0x2c], 0
fld dword [esi + 0x84]
mov al, byte [esi + 0x1e]
test al, al
fchs
mov ecx, dword [esi + 0x88]
fstp dword [esp + 0x64]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x18], 0
je 0x403d55
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x403d55
fld dword [esi + 0x50]
fcomp dword [0x6bda00]
fnstsw ax
test ah, 0x41
jne 0x403d55
fld dword [ebp + 0xc]
fmul dword [ecx + 0x70]
fstp dword [esp + 0x30]
fld dword [ebp + 0xc]
fmul dword [ecx + 0x74]
fstp dword [esp + 0x34]
fld dword [ebp + 0xc]
fmul dword [ecx + 0x78]
fstp dword [esp + 0x18]
mov esi, dword [ebx + 0x14]
lea eax, [ebx + 0x14]
cmp esi, eax
je 0x403fdc
movsx ecx, word [esi + 8]
mov edx, dword [esp + 0x50]
mov edi, dword [esi]
sub ecx, edx
test ecx, ecx
mov dword [esp + 0x14], edi
jle 0x403fb3
mov eax, dword [esp + 0x2c]
test eax, eax
movzx ebx, byte [esi + 0x1f]
je 0x403da9
mov eax, ecx
cdq
idiv dword [esp + 0x2c]
mov edi, eax
movsx eax, word [esi + 8]
cdq
idiv dword [esp + 0x2c]
mov edx, dword [esp + 0x60]
sub eax, edi
mov edi, dword [esp + 0x14]
add eax, ebx
and eax, edx
mov ebx, eax
movzx edx, byte [esi + 0xe]
movzx eax, word [esi + 0xc]
mov dword [esp + 0x14], edx
movsx edx, byte [esi + 0x1c]
fild dword [esp + 0x14]
mov dword [esp + 0x10], eax
movsx eax, byte [esi + 0x1d]
fmul dword [0x6bdbc4]
mov dword [esp + 0x44], 0x3f800000
fstp dword [esp + 0x14]
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
movsx edx, byte [esi + 0x1e]
mov dword [esp + 0x68], edx
fmul dword [0x6bda24]
mov edx, dword [esi + 0x14]
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x10]
fmul dword [0x6bdd60]
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0x18]
fmul st(1)
mov dword [esp + 0x28], eax
mov dword [esp + 0x6c], edx
fstp dword [esp + 0x20]
fild dword [esp + 0x10]
fmul dword [0x6bdd60]
fmul st(1)
fstp dword [esp + 0x10]
fild dword [esp + 0x68]
fmul dword [0x6bdd60]
fmulp st(1)
fld dword [esp + 0x20]
fcomp dword [0x6bda00]
fnstsw ax
test ah, 5
jnp 0x403e4b
mov dword [esp + 0x44], 0xbf800000
fld dword [esp + 0x10]
mov dword [esp + 0x40], 0x3f800000
fcomp dword [0x6bda00]
fnstsw ax
test ah, 5
jnp 0x403e6c
mov dword [esp + 0x40], 0xbf800000
fcom dword [0x6bda00]
fnstsw ax
test ah, 5
jp 0x403e81
fld dword [0x6bda18]
jmp 0x403e87
fld dword [0x6bdaf8]
fld dword [esp + 0x20]
mov edx, dword [esp + 0x54]
fmul dword [esp + 0x20]
mov al, byte [edx + 0x1e]
test al, al
fmul dword [esp + 0x24]
fmul dword [ebp + 0xc]
fmul dword [esp + 0x44]
fadd dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
fmul dword [esp + 0x24]
fmul dword [ebp + 0xc]
fmul dword [esp + 0x40]
fadd dword [esp + 0x10]
fstp dword [esp + 0x10]
fmul st(1)
fmul st(1)
fmul dword [esp + 0x24]
fadd dword [esp + 0x64]
fmul dword [ebp + 0xc]
faddp st(1)
fld dword [esp + 0x20]
fmul dword [ebp + 0xc]
fadd dword [esp + 0x5c]
fld dword [esp + 0x10]
fmul dword [ebp + 0xc]
fadd dword [esp + 0x6c]
fld st(2)
fmul dword [ebp + 0xc]
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
je 0x403f20
fld dword [esp + 0x14]
fmul dword [esp + 0x30]
faddp st(2)
fld dword [esp + 0x14]
fmul dword [esp + 0x34]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x18]
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
fld st(2)
mov word [esi + 8], cx
fmul st(3)
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
faddp st(1)
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fsqrt
fld dword [0x6bda18]
fdiv st(1)
fstp dword [esp + 0x14]
fmul dword [0x6bda1c]
call fcn.00666390
fxch st(1)
fstp dword [esi + 0x10]
mov word [esi + 0xc], ax
mov eax, dword [esp + 0x28]
fstp dword [esi + 0x14]
mov dword [esi + 0x18], eax
fld dword [esp + 0x14]
fmul dword [esp + 0x20]
fmul dword [0x6bdd7c]
call fcn.00666390
fld dword [esp + 0x14]
fmul dword [esp + 0x10]
mov byte [esi + 0x1c], al
fmul dword [0x6bdd7c]
call fcn.00666390
fld dword [esp + 0x14]
fmul st(1)
mov byte [esi + 0x1d], al
fmul dword [0x6bdd7c]
call fcn.00666390
fstp st(0)
mov byte [esi + 0x1f], bl
mov ebx, dword [esp + 0x1c]
mov byte [esi + 0x1e], al
jmp 0x403fcb
mov eax, dword [esi + 4]
mov ecx, dword [0x72b330]
push esi
mov dword [eax], edi
push ecx
mov dword [edi + 4], eax
call fcn.00599a60
add esp, 8
lea eax, [ebx + 0x14]
cmp edi, eax
mov esi, edi
jne 0x403d63
mov edi, dword [esp + 0x58]
cmp dword [eax], eax
jne 0x404001
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, ebx
call fcn.00401da0
mov edx, dword [0x72b334]
push ebx
push edx
call fcn.00599a60
add esp, 8
cmp edi, dword [esp + 0x48]
mov dword [esp + 0x1c], edi
jne 0x403c93
mov edi, dword [ebp + 8]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [0x7299fc]
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov ecx, esi
call fcn.006665b0
sub eax, dword [esp + 0x38]
mov dword [esp + 0x18], eax
jns 0x404044
mov dword [esp + 0x18], 0
mov ecx, esi
mov edx, 1
shl edx, cl
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
fimul dword [esp + 0x18]
fmul dword [0x727a04]
fstp dword [edi + 0x5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8