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

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x9c
push ebx
mov eax, dword [ecx + 8]
push esi
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x38], eax
push edi
push ebp
mov edi, dword [ecx]
mov eax, dword [ecx + 4]
mov dword [esp + 0x44], edx
mov edx, dword [ecx + 0x24]
mov dword [esp + 0x48], eax
mov eax, dword [0x42e890]
mov dword [esp + 0x54], edx
cmp dword [esp + 0x48], eax
jae case.0x420aaa.6
mov eax, dword [esp + 0x48]
mov ecx, eax
lea edx, [eax + eax*4]
lea eax, [edx + edx*8]
sub eax, ecx
lea esi, [eax + 0x43b5a0]
cmp dword [esi], 0
je case.0x420aaa.6
movsx ebx, word [esi + 0x10]
movsx eax, word [esi + 0x12]
mov dword [esp + 0x10], eax
movsx ecx, word [esi + 0x14]
movsx eax, word [esi + 0x16]
sub eax, ecx
mov ecx, dword [esi + 0x1c]
sub eax, dword [esp + 0x10]
mov dword [esp + 0x6c], ecx
mov edx, dword [esi + 4]
mov dword [esp + 0x24], eax
test edi, 2
mov dword [esp + 0x14], edx
je 0x420807
mov ecx, dword [esp + 0xb4]
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x4c], eax
cmp eax, 0x100
jne 0x4207d4
and edi, 0xfffffffd
movsx eax, word [esi + 0x18]
imul eax, dword [esp + 0x4c]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub dword [esp + 0x40], eax
mov eax, dword [esp + 0x4c]
imul eax, ebx
shr eax, 8
mov ecx, dword [esp + 0x40]
add eax, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], eax
jmp 0x42081d
movsx eax, word [esi + 0x18]
sub dword [esp + 0x40], eax
mov ecx, dword [esp + 0x40]
add ebx, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ebx
test edi, 0x100
je 0x42087f
mov ecx, dword [esp + 0xb4]
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x50], eax
cmp eax, 0x100
jne 0x420840
and edi, 0xfffff8ff
cmp dword [esp + 0x50], 0x100
jge 0x420850
and edi, 0xfffff9ff
movsx eax, word [esi + 0x1a]
imul eax, dword [esp + 0x50]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
imul eax, dword [esp + 0x50]
shr eax, 8
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x34], ecx
jmp 0x420893
movsx eax, word [esi + 0x1a]
sub dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x34], ecx
add eax, ecx
lea edx, [esp + 0x98]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xb0]
add eax, 0x14
mov ebx, dword [eax + 4]
mov ecx, eax
mov dword [esp + 0x90], eax
mov eax, dword [ecx]
mov ebp, dword [ecx + 8]
mov dword [edx], eax
mov eax, dword [ecx + 0xc]
mov dword [edx + 4], ebx
mov dword [edx + 8], ebp
mov dword [edx + 0xc], eax
mov edx, dword [esp + 0xa0]
mov ecx, dword [esp + 0x98]
mov esi, dword [esp + 0xa4]
cmp ecx, dword [esp + 0x30]
mov ecx, dword [esp + 0x9c]
jge 0x4208f6
mov eax, dword [esp + 0x30]
mov dword [esp + 0x98], eax
cmp edx, dword [esp + 0x38]
jle 0x420900
mov edx, dword [esp + 0x38]
cmp edx, dword [esp + 0x98]
jle case.0x420aaa.6
cmp ecx, dword [esp + 0x34]
jge 0x420917
mov ecx, dword [esp + 0x34]
cmp esi, dword [esp + 0x3c]
jle 0x420921
mov esi, dword [esp + 0x3c]
cmp ecx, esi
jge case.0x420aaa.6
mov eax, edx
sub eax, dword [esp + 0x98]
mov dword [esp + 0x58], eax
mov eax, esi
sub eax, ecx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x98]
sub eax, dword [esp + 0x30]
mov ebx, edi
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x38]
sub eax, edx
xor edx, edx
and ebx, 0x80
mov dword [esp + 0x74], eax
je 0x4209ba
mov eax, ecx
sub eax, dword [esp + 0x34]
test edi, 0x100
mov dword [esp + 0x78], eax
je 0x420999
mov ebp, eax
sub edx, edx
shl ebp, 8
mov eax, ebp
div dword [esp + 0x50]
add eax, dword [esp + 0x24]
sub edx, edx
imul eax, dword [esp + 0x6c]
add dword [esp + 0x14], eax
mov eax, ebp
div dword [esp + 0x50]
jmp 0x4209aa
mov eax, dword [esp + 0x78]
add eax, dword [esp + 0x24]
imul eax, dword [esp + 0x6c]
add dword [esp + 0x14], eax
mov eax, dword [esp + 0xb0]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x68], eax
jmp 0x420a16
mov eax, dword [esp + 0x3c]
sub eax, esi
test edi, 0x100
mov dword [esp + 0x78], eax
je 0x4209f0
mov ecx, eax
mov ebp, dword [esp + 0x50]
shl ecx, 8
sub edx, edx
mov eax, ecx
div ebp
add eax, dword [esp + 0x24]
sub edx, edx
imul eax, dword [esp + 0x6c]
add dword [esp + 0x14], eax
mov eax, ecx
div ebp
jmp 0x420a01
mov eax, dword [esp + 0x78]
add eax, dword [esp + 0x24]
imul eax, dword [esp + 0x6c]
add dword [esp + 0x14], eax
mov eax, dword [esp + 0xb0]
mov eax, dword [eax + 0x10]
mov ecx, eax
neg ecx
mov dword [esp + 0x68], ecx
lea ecx, [esi - 1]
imul ecx, eax
mov eax, dword [esp + 0xb0]
add ecx, dword [eax + 0xc]
mov eax, dword [esp + 0xb0]
add ecx, dword [esp + 0x98]
mov dword [esp + 0x64], ecx
mov ecx, dword [eax + 8]
mov eax, edi
add dword [esp + 0x64], ecx
and al, 0xc
cmp al, 0xc
jne 0x420a84
mov ecx, dword [esp + 0xb4]
mov ebp, dword [ecx + 0x28]
cmp ebp, 0xffffffff
jne 0x420a58
and edi, 0xfffffff3
jmp 0x420a84
and esi, 3
test ebx, ebx
lea ecx, [esi*8]
je 0x420a7b
mov eax, ebp
xor ecx, 0x10
rol eax, 8
ror ebp, 8
xor ebp, eax
and ebp, 0xff00ff
xor ebp, eax
rol ebp, cl
mov dword [esp + 0x84], ebp
mov eax, edi
and edi, 0x700
shr edi, 8
and ax, 0x3f
cmp edi, 7
movzx ecx, ax
mov ebx, dword [ecx*4 + 0x4354e0]
mov dword [esp + 0x18], ebx
ja case.0x420aaa.6
jmp dword [edi*4 + 0x421178]
mov ecx, dword [esp + 0xb4]
mov ebx, dword [ecx + 0x1c]
test ebx, ebx
je case.0x420aaa.0
mov ebp, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0xb4]
mov dword [esp + 0xa8], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x94], 0
mov eax, dword [edx + 0x18]
mov dword [esp + 0x1c], eax
test eax, eax
jge 0x420b08
neg eax
mov dword [esp + 0x94], 1
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x90]
mov dword [esp + 0x24], eax
mov ecx, dword [edx]
mov eax, dword [esp + 0xb0]
mov eax, dword [eax + 0x1c]
sub eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
sub eax, ecx
mov dword [esp + 0x28], eax
test eax, eax
jle 0x420b3d
mov ebp, dword [esp + 0x64]
sub ebp, eax
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x5c]
sub esi, dword [esp + 0x30]
add edi, edi
mov ecx, dword [esp + 0x14]
test edi, edi
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x60], ecx
jle case.0x420aaa.6
mov dword [esp + 0x98], 0
inc edi
shr edi, 1
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0xb4]
cdq
idiv dword [esp + 0x1c]
mov ecx, dword [ecx + 0x20]
add ecx, eax
and ecx, 0xff
movsx eax, bl
movsx ecx, byte [ecx + 0x4355e0]
imul ecx, eax
sar ecx, 7
cmp dword [esp + 0x94], 0
je 0x420bb4
neg bl
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
add edx, ecx
add ecx, dword [esp + 0x24]
sub eax, edx
mov dword [esp + 0x40], ecx
cmp eax, esi
jl 0x420bce
mov eax, esi
mov dword [esp + 0x58], eax
test edx, edx
mov dword [esp + 0x70], 0
jge 0x420bea
add dword [esp + 0x58], edx
neg edx
mov dword [esp + 0x70], edx
xor edx, edx
cmp dword [esp + 0x58], 0
jle 0x420c08
add edx, ebp
lea eax, [esp + 0x40]
mov dword [esp + 0x64], edx
push eax
mov dword [esp + 0x60], 1
call dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
add ebp, dword [esp + 0xa8]
add dword [esp + 0x98], 0x200
add dword [esp + 0x60], eax
dec edi
jne 0x420b7a
jmp case.0x420aaa.6
mov ecx, dword [esp + 0xb4]
mov ebx, dword [ecx + 0x1c]
test ebx, ebx
je case.0x420aaa.1
mov ebp, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0xb4]
mov dword [esp + 0xa8], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x94], 0
mov eax, dword [edx + 0x18]
mov dword [esp + 0x1c], eax
test eax, eax
jge 0x420c85
neg eax
mov dword [esp + 0x94], 1
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x90]
mov dword [esp + 0x24], eax
mov ecx, dword [edx]
mov eax, dword [esp + 0xb0]
mov eax, dword [eax + 0x1c]
sub eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
sub eax, ecx
mov dword [esp + 0x28], eax
test eax, eax
jle 0x420cb6
sub ebp, eax
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x5c]
shl eax, 8
sub edi, dword [esp + 0x30]
cdq
idiv dword [esp + 0x50]
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov ecx, dword [esp + 0x5c]
add ecx, ecx
mov dword [esp + 0x20], ecx
test ecx, ecx
jle case.0x420aaa.6
add eax, eax
xor esi, esi
mov dword [esp + 0x90], 0
mov dword [esp + 0x98], eax
lea eax, [ecx + 1]
shr eax, 1
mov dword [esp + 0x30], eax
mov eax, esi
mov ecx, dword [esp + 0xb4]
cdq
idiv dword [esp + 0x1c]
mov ecx, dword [ecx + 0x20]
add ecx, eax
and ecx, 0xff
movsx eax, bl
movsx edx, byte [ecx + 0x4355e0]
imul edx, eax
sar edx, 7
cmp dword [esp + 0x94], 0
je 0x420d41
neg bl
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
add ecx, edx
add edx, dword [esp + 0x24]
sub eax, ecx
mov dword [esp + 0x40], edx
cmp eax, edi
jl 0x420d5b
mov eax, edi
mov dword [esp + 0x70], 0
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x90]
cdq
idiv dword [esp + 0x20]
imul eax, dword [esp + 0x2c]
add eax, dword [esp + 0x14]
test ecx, ecx
mov dword [esp + 0x60], eax
jge 0x420d90
add dword [esp + 0x58], ecx
neg ecx
mov dword [esp + 0x70], ecx
xor ecx, ecx
cmp dword [esp + 0x58], 0
jle 0x420dae
add ecx, ebp
lea eax, [esp + 0x40]
mov dword [esp + 0x64], ecx
push eax
mov dword [esp + 0x60], 1
call dword [esp + 0x1c]
add ebp, dword [esp + 0xa8]
mov eax, dword [esp + 0x98]
add esi, 0x200
add dword [esp + 0x90], eax
dec dword [esp + 0x30]
jne 0x420d0c
jmp case.0x420aaa.6
xor esi, esi
mov ecx, dword [esp + 0xb4]
cmp dword [ecx + 0x18], esi
jle case.0x420aaa.6
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
sub ebx, dword [esp + 0x78]
mov dword [esp + 0x20], ecx
dec ebx
mov dword [esp + 0x6c], esi
cmp ecx, esi
jle case.0x420aaa.6
mov edi, ebx
shl edi, 7
shl ebx, 8
mov ebp, esi
mov eax, ebx
mov ecx, dword [esp + 0xb4]
inc esi
cdq
idiv dword [ecx + 0x18]
mov ecx, dword [ecx + 0x20]
sub ebx, 0x100
mov dword [esp + 0x5c], 1
add ecx, eax
mov eax, edi
and ecx, 0xff
sub edi, 0x80
cdq
idiv dword [esp + 0x10]
and eax, 0xff
movsx ecx, byte [ecx + 0x4355e0]
movsx edx, byte [eax + 0x4355e0]
imul ecx, edx
imul ecx, dword [esp + 0x10]
mov eax, ecx
cdq
and edx, 0xffff
add eax, edx
sar eax, 0x10
sub ebp, eax
lea eax, [esp + 0x40]
imul ebp, dword [esp + 0x2c]
add ebp, dword [esp + 0x14]
push eax
mov dword [esp + 0x64], ebp
call dword [esp + 0x1c]
cmp esi, dword [esp + 0x20]
jl 0x420e17
jmp case.0x420aaa.6
xor esi, esi
mov ecx, dword [esp + 0xb4]
cmp dword [ecx + 0x18], esi
jle case.0x420aaa.6
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x6c], esi
imul eax, dword [esp + 0x50]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub eax, dword [esp + 0x78]
cmp ecx, esi
lea ebx, [eax - 1]
jle case.0x420aaa.6
mov edi, ebx
mov eax, dword [esp + 0x3c]
shl edi, 7
sub eax, dword [esp + 0x34]
shl ebx, 8
mov dword [esp + 0x98], eax
mov dword [esp + 0x30], ecx
mov eax, esi
mov ecx, dword [esp + 0xb4]
cdq
idiv dword [esp + 0x50]
mov ebp, eax
add esi, 0x100
mov dword [esp + 0x5c], 1
mov eax, ebx
sub ebx, 0x100
cdq
idiv dword [ecx + 0x18]
mov ecx, dword [ecx + 0x20]
add ecx, eax
mov eax, edi
and ecx, 0xff
sub edi, 0x80
cdq
idiv dword [esp + 0x98]
and eax, 0xff
movsx ecx, byte [ecx + 0x4355e0]
movsx edx, byte [eax + 0x4355e0]
imul ecx, edx
imul ecx, dword [esp + 0x10]
mov eax, ecx
cdq
and edx, 0xffff
add eax, edx
sar eax, 0x10
sub ebp, eax
lea eax, [esp + 0x40]
imul ebp, dword [esp + 0x2c]
add ebp, dword [esp + 0x14]
push eax
mov dword [esp + 0x64], ebp
call dword [esp + 0x1c]
dec dword [esp + 0x30]
jne 0x420efe
jmp case.0x420aaa.6
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x6c], 0
cmp dword [esp + 0x50], 0x100
mov dword [esp + 0x60], eax
jle case.0x420aaa.6
mov eax, dword [esp + 0x5c]
mov ebp, dword [esp + 0x50]
shl eax, 8
mov dword [esp + 0x98], edx
lea edi, [eax + edx]
cmp ebp, edi
jge 0x421041
mov dword [esp + 0x5c], 1
lea eax, [esp + 0x40]
push eax
call dword [esp + 0x1c]
mov eax, ebp
add dword [esp + 0x60], esi
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ebx, eax
mov eax, dword [esp + 0x98]
cdq
and edx, 0xff
mov dword [esp + 0x98], ebp
add eax, edx
add ebp, dword [esp + 0x50]
sar eax, 8
mov edx, ebx
sub edx, eax
sub bl, al
dec edx
dec bl
imul edx, dword [esp + 0x68]
and bl, 3
add dword [esp + 0x64], edx
mov edx, dword [esp + 0x84]
lea ecx, [ebx*8]
ror edx, cl
mov dword [esp + 0x84], edx
cmp ebp, edi
jl 0x420fce
mov eax, edi
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ecx, eax
mov eax, dword [esp + 0x98]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub ecx, eax
test ecx, ecx
jle case.0x420aaa.6
mov dword [esp + 0x5c], 1
jmp 0x421161
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x40]
mov dword [esp + 0x60], eax
push ecx
jmp 0x421166
mov esi, dword [esp + 0x6c]
xor ebx, ebx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x6c], ebx
cmp dword [esp + 0x50], 0x100
mov dword [esp + 0x60], eax
jge 0x4210ea
xor ecx, ecx
mov edi, dword [esp + 0x5c]
test edi, edi
jle case.0x420aaa.6
mov dword [esp + 0x5c], 1
mov eax, ebx
add ebx, 0x100
cdq
idiv dword [esp + 0x50]
mov ebp, eax
sub eax, ecx
imul eax, esi
lea ecx, [esp + 0x40]
add dword [esp + 0x60], eax
push ecx
call dword [esp + 0x1c]
mov ecx, ebp
dec edi
jne 0x4210b7
jmp case.0x420aaa.6
mov eax, dword [esp + 0x5c]
mov ebp, edx
shl eax, 8
mov ebx, dword [esp + 0x50]
lea edi, [eax + edx]
cmp ebx, edi
jge 0x421139
mov eax, ebx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ecx, eax
mov eax, ebp
cdq
and edx, 0xff
mov ebp, ebx
add eax, edx
sar eax, 8
sub ecx, eax
lea eax, [esp + 0x40]
mov dword [esp + 0x5c], ecx
push eax
call dword [esp + 0x1c]
add ebx, dword [esp + 0x50]
add dword [esp + 0x60], esi
cmp ebx, edi
jl 0x4210fe
mov eax, edi
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ecx, eax
mov eax, ebp
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub ecx, eax
test ecx, ecx
jle case.0x420aaa.6
mov dword [esp + 0x5c], ecx
lea eax, [esp + 0x40]
push eax
call dword [esp + 0x1c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x9c
ret 8