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

Disassembly:
sub esp, 0x4c
mov ecx, dword [0x59c790]
test ecx, ecx
mov eax, dword [esp + 0x6c]
push ebp
mov ebp, dword [esp + 0x68]
setne byte [esp + 7]
push esi
test eax, eax
mov esi, 3
push edi
cmovne esi, eax
mov dword [esp + 0x34], esi
test ecx, ecx
jne 0x4dce1f
call fcn.0049d670
mov ecx, eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x58]
call eax
test al, al
jne 0x4dce27
dec esi
or esi, 1
mov dword [esp + 0x34], esi
cmp dword [esp + 0x74], 0
mov edi, dword [esp + 0x68]
jne 0x4dce40
mov eax, ebp
cdq
xor eax, edx
sub eax, edx
imul eax, edi
mov dword [esp + 0x74], eax
mov ecx, dword [0x599954]
lea edx, [esp + 0x18]
push edx
lea edx, [esp + 0x7c]
mov dword [esp + 0x24], 0
push edx
lea edx, [esp + 0x24]
mov dword [esp + 0x24], 0
push edx
lea edx, [esp + 0x2c]
mov dword [esp + 0x84], 0
push edx
push dword [esp + 0x7c]
mov dword [esp + 0x2c], 0
mov eax, dword [ecx]
push edi
push dword [esp + 0x7c]
push dword [esp + 0x7c]
call dword [eax + 0xb0]
cmp dword [esp + 0x78], 0
jle 0x4dd5af
cmp dword [esp + 0x18], 0
jle 0x4dd5af
push ebx
mov ebx, dword [esp + 0x60]
test ebx, ebx
je 0x4dced1
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x24]
sub ecx, dword [esp + 0x64]
imul eax, dword [esp + 0x78]
imul ecx, ebp
add ebx, eax
add ebx, ecx
mov dword [esp + 0x60], ebx
cmp dword [0x59cb28], 0
mov eax, 1
jne 0x4dcf03
xorps xmm0, xmm0
mov dword [0x59cb28], 0x28
mov word [0x59cb34], ax
mov dword [0x59cb38], 0
movups xmmword [0x59cb40], xmm0
mov dl, byte [esp + 0x13]
test dl, dl
je 0x4dcf30
xor eax, eax
mov dword [esp + 0x50], 0x100
mov ecx, 0x59cb50
nop word [eax + eax]
mov word [ecx], ax
lea ecx, [ecx + 2]
inc eax
cmp ax, word [esp + 0x50]
jl 0x4dcf20
jmp 0x4dcf65
cmp esi, 3
jge 0x4dcf65
xor eax, eax
nop word [eax + eax]
mov byte [eax*4 + 0x59cb50], al
mov byte [eax*4 + 0x59cb51], al
mov byte [eax*4 + 0x59cb52], al
mov byte [eax*4 + 0x59cb53], 0
inc eax
cmp eax, 0x100
jl 0x4dcf40
mov eax, dword [esp + 0x7c]
test dl, dl
mov dword [0x59cb2c], eax
mov ecx, 8
lea eax, [esi*8]
movzx eax, ax
cmove ecx, eax
mov eax, esi
mov word [0x59cb36], cx
mov ecx, 1
cmovne eax, ecx
cmp esi, 2
jne 0x4dcfa8
mov eax, 0x20
mov word [0x59cb36], ax
mov eax, 4
imul eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x1c]
mov esi, ecx
mov dword [esp + 0x28], ecx
add eax, 3
and eax, 0xfffffffc
imul esi, eax
mov dword [esp + 0x30], eax
cmp esi, 0x40000
jle 0x4dcff0
mov ecx, dword [0x599954]
push 2
mov eax, dword [ecx]
call dword [eax + 0x14c]
test eax, eax
jne 0x4dcff0
mov esi, 0x40000
mov eax, esi
cdq
idiv dword [esp + 0x30]
mov dword [esp + 0x28], eax
cmp esi, dword [0x59cf5c]
jle 0x4dd033
push dword [0x59cf58]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
lea eax, [esi + 3]
mov dword [0x59cf5c], esi
cdq
xor ecx, ecx
and edx, 3
add eax, edx
mov edx, 4
sar eax, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 8
mov dword [0x59cf58], eax
mov esi, dword [esp + 0x28]
mov dword [0x59cb30], esi
test ebx, ebx
jne 0x4dd08c
imul edi, ebp
cmp edi, dword [0x59cf64]
jle 0x4dd08c
push dword [0x59cf60]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
lea eax, [edi + 3]
mov dword [0x59cf64], edi
cdq
xor ecx, ecx
and edx, 3
add eax, edx
mov edx, 4
sar eax, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edi, eax
add esp, 8
mov dword [0x59cf60], edi
jmp 0x4dd092
mov edi, dword [0x59cf60]
xor ecx, ecx
mov dword [esp + 0x3c], ecx
cmp dword [esp + 0x1c], ecx
jle 0x4dd5ae
movzx eax, byte [esp + 0x13]
mov dword [esp + 0x50], eax
nop dword [eax + eax]
xor eax, eax
mov dword [esp + 0x34], eax
cmp ecx, dword [esp + 0x1c]
jge 0x4dd3da
mov edx, ecx
dec esi
sub edx, dword [esp + 0x68]
imul esi, dword [esp + 0x30]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], esi
cmp eax, dword [esp + 0x28]
jge 0x4dd3d6
test ebx, ebx
jne 0x4dd117
mov eax, dword [esp + 0x20]
push edi
push dword [esp + 0x80]
add eax, edx
push eax
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x70]
push eax
push dword [esp + 0x94]
call dword [esp + 0x94]
mov edi, dword [0x59cf60]
add esp, 0x14
mov edx, dword [esp + 0x14]
jmp 0x4dd121
mov edi, ebx
add ebx, dword [esp + 0x78]
mov dword [esp + 0x60], ebx
mov ecx, dword [0x59cf58]
add ecx, esi
cmp byte [esp + 0x13], 0
je 0x4dd465
cmp dword [esp + 0x38], 3
mov edx, dword [esp + 0x7c]
jge 0x4dd20c
cmp dword [0x59cb24], 0
mov ebp, dword [0x59cb20]
je 0x4dd174
lea eax, [edx - 1]
dec ecx
imul eax, dword [esp + 0x74]
add ecx, edx
add edi, eax
mov eax, dword [esp + 0x74]
neg eax
mov dword [esp + 0x2c], eax
or eax, 0xffffffff
mov dword [esp + 0x40], eax
xor eax, eax
jmp 0x4dd189
mov eax, dword [esp + 0x74]
mov dword [esp + 0x2c], eax
mov eax, 1
mov dword [esp + 0x40], 1
mov dword [0x59cb24], eax
test edx, edx
je 0x4dd1fd
movzx eax, byte [edi]
dec edx
add ebp, eax
mov dword [esp + 0x4c], edx
jns 0x4dd1a2
xor ebp, ebp
jmp 0x4dd1b0
cmp ebp, 0xff
mov eax, 0xff
cmovg ebp, eax
lea eax, [ebp*2]
add edi, dword [esp + 0x2c]
add eax, ebp
shl eax, 3
cdq
and edx, 0xff
lea ebx, [edx + eax]
mov eax, 0xb21642c9
sar ebx, 8
imul esi, ebx, 0xffffff01
add bl, 0x20
mov byte [ecx], bl
add ecx, dword [esp + 0x40]
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x4c]
add ebp, eax
test edx, edx
jne 0x4dd192
mov esi, dword [esp + 0x18]
mov dword [0x59cb20], ebp
mov ebp, dword [esp + 0x74]
jmp 0x4dd39f
cmp dword [0x59cb1c], 0
mov esi, dword [0x59cb18]
mov ebp, dword [0x59cb10]
mov ebx, dword [0x59cb14]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x40], esi
je 0x4dd258
lea eax, [edx - 1]
mov dword [esp + 0x48], 0xffffffff
mov edx, dword [esp + 0x74]
imul eax, edx
neg edx
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x2c]
add edi, eax
mov eax, dword [esp + 0x2c]
dec eax
add ecx, eax
xor eax, eax
jmp 0x4dd26d
mov eax, dword [esp + 0x74]
mov dword [esp + 0x44], eax
mov eax, 1
mov dword [esp + 0x48], 1
mov dword [0x59cb1c], eax
test edx, edx
je 0x4dd385
nop word [eax + eax]
movzx eax, byte [edi]
dec edx
add ebp, eax
mov dword [esp + 0x2c], edx
mov esi, 0xff
jns 0x4dd295
xor ebp, ebp
jmp 0x4dd29e
cmp ebp, 0xff
cmovg ebp, esi
lea eax, [ebp*4]
add eax, ebp
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x54], eax
imul eax, eax, 0xffffff01
cdq
and edx, 3
add eax, edx
sar eax, 2
add ebp, eax
movzx eax, byte [edi + 1]
add ebx, eax
jns 0x4dd2d4
xor ebx, ebx
jmp 0x4dd2dd
cmp ebx, 0xff
cmovg ebx, esi
lea eax, [ebx*8]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
imul esi, eax, 0xffffff01
mov dword [esp + 0x58], eax
mov eax, 0x92492493
imul esi
add edx, esi
mov esi, dword [esp + 0x40]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add ebx, eax
movzx eax, byte [edi + 2]
add esi, eax
mov dword [esp + 0x4c], ebx
jns 0x4dd323
xor esi, esi
jmp 0x4dd331
cmp esi, 0xff
mov eax, 0xff
cmovg esi, eax
lea eax, [esi + esi*4]
add edi, dword [esp + 0x44]
cdq
and edx, 0xff
lea ebx, [edx + eax]
sar ebx, 8
imul eax, ebx, 0xffffff01
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x2c]
sar eax, 2
add esi, eax
mov al, bl
shl bl, 2
add bl, 7
mov dword [esp + 0x40], esi
add al, bl
mov ebx, dword [esp + 0x4c]
add al, byte [esp + 0x54]
shl al, 3
add al, byte [esp + 0x58]
mov byte [ecx], al
add ecx, dword [esp + 0x48]
test edx, edx
jne 0x4dd280
mov dword [0x59cb10], ebp
mov ebp, dword [esp + 0x74]
mov dword [0x59cb14], ebx
mov dword [0x59cb18], esi
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x60]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
inc edx
mov eax, dword [esp + 0x34]
inc ecx
sub esi, dword [esp + 0x30]
inc eax
mov edi, dword [0x59cf60]
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x14], edx
cmp ecx, dword [esp + 0x1c]
jl 0x4dd0d4
mov esi, dword [esp + 0x28]
mov edi, ecx
sub esi, eax
mov ecx, dword [0x599954]
sub edi, eax
imul esi, dword [esp + 0x30]
push 2
mov eax, dword [ecx]
call dword [eax + 0x14c]
mov ecx, dword [esp + 0x34]
test eax, eax
mov eax, dword [0x59cf58]
je 0x4dd562
push 0xcc0020
push dword [esp + 0x54]
add eax, esi
push 0x59cb28
push eax
mov eax, dword [esp + 0x8c]
push ecx
push eax
push 0
push 0
push ecx
push eax
mov eax, dword [esp + 0x48]
add eax, edi
push eax
push dword [esp + 0x50]
push dword [esp + 0xb8]
call dword [sym.imp.gdi32.dll_StretchDIBits]
push dword [0x59cf58]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov dword [0x59cf58], 0
mov dword [0x59cf5c], 0
jmp 0x4dd595
mov eax, dword [esp + 0x38]
dec eax
cmp eax, 3
ja case.default.0x4dd473
jmp dword [eax*4 + 0x4dd5b8]
mov edx, dword [esp + 0x7c]
test edx, edx
je 0x4dd3a3
mov al, byte [edi]
lea ecx, [ecx + 1]
add edi, ebp
mov byte [ecx - 1], al
sub edx, 1
jne 0x4dd486
jmp 0x4dd3a3
mov esi, dword [esp + 0x7c]
test esi, esi
je 0x4dd550
mov bl, byte [edi + 1]
lea ecx, [ecx + 4]
movzx eax, byte [edi]
add edi, ebp
movzx edx, bl
imul edx, eax
mov byte [ecx - 1], bl
shr edx, 8
mov byte [ecx - 4], dl
mov byte [ecx - 3], dl
mov byte [ecx - 2], dl
sub esi, 1
jne 0x4dd4a6
jmp 0x4dd39b
mov esi, dword [esp + 0x7c]
test esi, esi
je 0x4dd550
inc edi
nop dword [eax]
mov al, byte [edi + 1]
lea ecx, [ecx + 3]
mov dl, byte [edi - 1]
mov byte [ecx - 3], al
mov al, byte [edi]
add edi, ebp
mov byte [ecx - 2], al
mov byte [ecx - 1], dl
sub esi, 1
jne 0x4dd4e0
mov esi, dword [esp + 0x18]
jmp 0x4dd3a3
mov ebx, dword [esp + 0x7c]
test ebx, ebx
je 0x4dd559
add edi, 3
nop
movzx esi, byte [edi]
lea ecx, [ecx + 4]
movzx eax, byte [edi - 1]
mov dl, byte [edi - 3]
imul eax, esi
shr eax, 8
mov byte [ecx - 4], al
movzx eax, byte [edi - 2]
imul eax, esi
shr eax, 8
mov byte [ecx - 3], al
movzx eax, dl
imul eax, esi
shr eax, 8
mov byte [ecx - 2], al
mov al, byte [edi]
add edi, ebp
mov byte [ecx - 1], al
sub ebx, 1
jne 0x4dd510
jmp 0x4dd39b
mov esi, dword [esp + 0x18]
jmp case.default.0x4dd473
mov ebx, dword [esp + 0x60]
jmp case.default.0x4dd473
push dword [esp + 0x50]
add eax, esi
push 0x59cb28
push eax
mov eax, dword [esp + 0x2c]
push ecx
push 0
push 0
push 0
push ecx
push dword [esp + 0x9c]
add eax, edi
push eax
push dword [esp + 0x4c]
push dword [esp + 0xb4]
call dword [sym.imp.gdi32.dll_SetDIBitsToDevice]
mov ecx, dword [esp + 0x3c]
cmp ecx, dword [esp + 0x1c]
jge 0x4dd5ae
mov edi, dword [0x59cf60]
mov esi, dword [esp + 0x28]
jmp 0x4dd0b0
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret