Function at 0x498ec0
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
cmp dword [esp + 0x5c], 0
push ebx
push esi
push edi
push ebp
je 0x498ee2
mov eax, dword [esp + 0x6c]
push 0
push 0
push 0x401
push eax
call dword [case.0x427228.0]
mov eax, dword [esp + 0x84]
mov edi, dword [esp + 0x74]
and eax, 0xffff
and edi, 0xffff
xor esi, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x88]
fild qword [esp + 0x14]
and eax, 0xffff
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x58], eax
fild qword [esp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x78]
and eax, 0xffff
mov dword [esp + 0x18], esi
fdivp st(1)
fstp dword [esp + 0x1c]
fild qword [esp + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
fild qword [esp + 0x14]
fdivp st(1)
fstp dword [esp + 0x5c]
fld qword [0x4b3e20]
fdiv dword [esp + 0x1c]
fadd qword [0x4b3e28]
call 0x4a8cd0
fld qword [0x4b3e20]
fdiv dword [esp + 0x5c]
mov dword [esp + 0x34], eax
fadd qword [0x4b3e28]
call 0x4a8cd0
xor ecx, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
mov cl, byte [esp + 0x7c]
imul eax, dword [esp + 0x30]
mov dword [esp + 0x44], eax
mov eax, ecx
imul eax, edi
imul ecx, dword [esp + 0x28]
add eax, 0x1f
add ecx, 0x1f
and eax, 0xffffffe7
and ecx, 0xffffffe7
shr eax, 3
shr ecx, 3
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x28]
mov edi, dword [0x4c2588]
add eax, eax
mov dword [esp + 0x64], ecx
push eax
push 0x42
call edi
mov dword [esp + 0x20], eax
cmp eax, esi
jne 0x498fe1
mov ax, 0x66
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x20]
mov esi, dword [0x4c258c]
push eax
call esi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x28]
shl eax, 2
push eax
push 0x42
call edi
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x499028
mov eax, dword [esp + 0x20]
push eax
call dword [0x4c2590]
mov ecx, dword [esp + 0x20]
push ecx
call dword [0x4c2594]
mov ax, 0x66
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x2c]
xor edi, edi
push eax
call esi
xor si, si
mov dword [esp + 0x4c], eax
cmp word [esp + 0x84], di
je 0x4990a1
fld qword [0x4b3e38]
fld dword [esp + 0x1c]
movzx ebx, si
inc si
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
fild qword [esp + 0x14]
fdiv st(1)
fld st(0)
call 0x4a8cd0
movzx ecx, ax
mov edx, dword [esp + 0x48]
mov dword [esp + 0x14], ecx
mov word [edx + ebx*2], ax
mov dword [esp + 0x18], edi
fild qword [esp + 0x14]
fsubp st(1)
fmul dword [0x4b3e30]
fsubr st(2)
call 0x4a8cd0
cmp si, word [esp + 0x84]
mov edx, dword [esp + 0x4c]
mov dword [edx + ebx*4], eax
jb 0x49904c
fstp st(0)
fstp st(0)
mov word [esp + 0x10], 0
cmp word [esp + 0x88], 0
je 0x4993ef
cmp dword [esp + 0x6c], 0
je 0x4990fd
mov eax, dword [esp + 0x10]
push 0
and eax, 0xffff
lea ecx, [eax*4 + 4]
lea edx, [ecx + ecx*4]
lea eax, [edx + edx*4]
cdq
idiv dword [esp + 0x5c]
push eax
push 0x401
mov eax, dword [esp + 0x78]
push eax
call dword [case.0x427228.0]
push 0x1b
call dword [0x4c3300]
test ax, ax
jl 0x49943d
mov eax, dword [esp + 0x10]
and eax, 0xffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
fild qword [esp + 0x14]
fdiv dword [esp + 0x5c]
fld st(0)
call 0x4a8cd0
movzx esi, ax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 0
fild qword [esp + 0x14]
fsubp st(1)
fmul dword [0x4b3e30]
fsubr qword [0x4b3e38]
call 0x4a8cd0
cmp byte [esp + 0x7c], 8
mov word [esp + 0x12], 0
mov dword [esp + 0x60], eax
jne 0x499257
cmp word [esp + 0x84], 0
je 0x49923c
mov eax, dword [esp + 0x40]
imul eax, esi
mov dword [esp + 0x14], eax
xor eax, eax
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x60]
mov ecx, dword [esp + 0x12]
and ecx, 0xffff
xor ebx, ebx
mov edx, dword [esp + 0x48]
mov bx, word [edx + ecx*2]
mov edx, dword [esp + 0x14]
add ebx, dword [esp + 0x70]
add edx, ebx
cmp edi, eax
mov dword [esp + 0x38], edx
je 0x49920e
mov edx, dword [esp + 0x4c]
mov ecx, dword [edx + ecx*4]
mov dword [esp + 0x1c], ecx
mov ebx, dword [esp + 0x38]
cmp esi, edi
jae 0x4991c7
sub edi, esi
mov dword [esp + 0x24], esi
mov esi, 0x100
jmp 0x4991cd
mov dword [esp + 0x24], edi
xor edi, edi
mov edx, dword [esp + 0x34]
mov ebp, dword [esp + 0x1c]
cmp edx, ebp
jbe 0x4991f4
xor ecx, ecx
inc ebx
sub edx, ebp
mov cl, byte [ebx - 1]
imul ecx, ebp
imul ecx, dword [esp + 0x24]
add eax, ecx
mov ebp, 0x100
cmp edx, ebp
ja 0x4991d9
xor ecx, ecx
mov cl, byte [ebx]
imul ecx, edx
imul ecx, dword [esp + 0x24]
add eax, ecx
mov edx, dword [esp + 0x40]
add dword [esp + 0x38], edx
test edi, edi
jne 0x4991b2
inc word [esp + 0x12]
sub edx, edx
div dword [esp + 0x44]
mov ecx, dword [esp + 0x80]
inc dword [esp + 0x80]
mov byte [ecx], al
mov ax, word [esp + 0x12]
cmp ax, word [esp + 0x84]
jb 0x499177
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x64]
sub dword [esp + 0x80], ecx
add dword [esp + 0x80], eax
jmp 0x4993d7
cmp word [esp + 0x84], 0
je 0x4993be
mov eax, dword [esp + 0x40]
imul eax, esi
mov dword [esp + 0x14], eax
xor eax, eax
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x60]
mov esi, dword [esp + 0x12]
and esi, 0xffff
xor edi, edi
mov edx, dword [esp + 0x48]
mov dword [esp + 0x50], eax
mov di, word [edx + esi*2]
mov dword [esp + 0x54], eax
mov dword [esp + 0x3c], ecx
lea edi, [edi + edi*2]
add edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x14]
add ecx, edi
cmp ebp, eax
mov dword [esp + 0x38], ecx
je 0x49935c
mov edx, dword [esp + 0x4c]
mov edi, dword [edx + esi*4]
mov dword [esp + 0x1c], edi
mov esi, dword [esp + 0x38]
cmp dword [esp + 0x3c], ebp
jae 0x4992dd
mov ecx, dword [esp + 0x3c]
sub ebp, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x3c], 0x100
jmp 0x4992e3
mov dword [esp + 0x24], ebp
xor ebp, ebp
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
cmp edx, ecx
jbe 0x499325
mov edi, ecx
sub edx, ecx
mov ecx, 0x100
xor ebx, ebx
mov bl, byte [esi]
inc esi
imul edi, dword [esp + 0x24]
imul ebx, edi
add eax, ebx
inc esi
xor ebx, ebx
mov bl, byte [esi - 1]
inc esi
imul ebx, edi
add dword [esp + 0x50], ebx
xor ebx, ebx
mov bl, byte [esi - 1]
imul ebx, edi
add dword [esp + 0x54], ebx
cmp edx, ecx
ja 0x4992ef
xor ecx, ecx
inc esi
mov cl, byte [esi - 1]
imul edx, dword [esp + 0x24]
imul ecx, edx
add eax, ecx
xor ecx, ecx
mov cl, byte [esi]
imul ecx, edx
add dword [esp + 0x50], ecx
xor ecx, ecx
mov cl, byte [esi + 1]
imul ecx, edx
mov edx, dword [esp + 0x40]
add dword [esp + 0x54], ecx
add dword [esp + 0x38], edx
test ebp, ebp
jne 0x4992bf
sub edx, edx
mov ecx, dword [esp + 0x80]
div dword [esp + 0x44]
sub edx, edx
mov byte [ecx], al
mov eax, dword [esp + 0x50]
inc dword [esp + 0x80]
div dword [esp + 0x44]
mov ecx, dword [esp + 0x80]
sub edx, edx
inc dword [esp + 0x80]
mov byte [ecx], al
inc word [esp + 0x12]
mov eax, dword [esp + 0x54]
div dword [esp + 0x44]
mov ecx, dword [esp + 0x80]
inc dword [esp + 0x80]
mov byte [ecx], al
mov ax, word [esp + 0x12]
cmp ax, word [esp + 0x84]
jb 0x499271
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x64]
lea ecx, [eax + eax*2]
sub dword [esp + 0x80], ecx
add dword [esp + 0x80], edx
inc word [esp + 0x10]
mov ax, word [esp + 0x10]
cmp ax, word [esp + 0x88]
jb 0x4990b7
cmp dword [esp + 0x6c], 0
je 0x49940a
mov eax, dword [esp + 0x6c]
push 0
push 0x64
push 0x401
push eax
call dword [case.0x427228.0]
mov eax, dword [esp + 0x20]
mov esi, dword [0x4c2590]
push eax
call esi
mov ecx, dword [esp + 0x2c]
push ecx
call esi
mov eax, dword [esp + 0x20]
mov esi, dword [0x4c2594]
push eax
call esi
mov ecx, dword [esp + 0x2c]
push ecx
call esi
xor ax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x20]
mov esi, dword [0x4c2590]
push eax
call esi
mov ecx, dword [esp + 0x2c]
push ecx
call esi
mov eax, dword [esp + 0x20]
mov esi, dword [0x4c2594]
push eax
call esi
mov ecx, dword [esp + 0x2c]
push ecx
call esi
mov ax, 0x64
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret