Function at 0x4101f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x438a28
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x6c]
movzx eax, word [edi + 6]
mov esi, ecx
movzx ecx, word [edi + 4]
mov ebp, dword [esi + 0x4234]
imul eax, ecx
push 4
imul ebp, eax
lea edx, [esp + 0x48]
push edx
mov ecx, esi
call fcn.00404470
mov eax, dword [esp + 0x44]
mov ebx, eax
mov ecx, eax
mov edx, eax
and ebx, 0xff0000
shr ecx, 0x10
and edx, 0xff00
or ebx, ecx
shl eax, 0x10
or edx, eax
shl edx, 8
shr ebx, 8
or ebx, edx
push ebx
mov ecx, esi
call fcn.004046e0
mov eax, dword [esi + 0x1c4]
push ebx
push eax
mov ecx, esi
call fcn.00404470
push ebp
mov ecx, esi
call fcn.004047e0
mov ecx, dword [esi + 0x1c4]
mov edx, dword [esi + 0x274]
lea eax, [esi + 0x280]
mov dword [eax], ecx
mov cl, byte [esi + 0x27c]
mov dword [esi + 0x284], ebx
xor ebx, ebx
test cl, cl
mov dword [esi + 0x28c], edx
mov dword [esi + 0x290], ebp
mov dword [esi + 0x2ac], ebx
jne 0x410315
push 0x38
push str.1.1.4
push eax
mov dword [esi + 0x288], ebx
mov dword [esi + 0x294], ebx
mov dword [esi + 0x2a0], ebx
mov dword [esi + 0x2a4], ebx
mov dword [esi + 0x2a8], ebx
call fcn.0042a910
add esp, 0xc
cmp eax, ebx
je 0x41030e
push eax
push str.zlib_inflateInit_error:__d_n
push ebx
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret 4
mov byte [esi + 0x27c], 1
lea eax, [esi + 0x280]
push 2
push eax
call fcn.0042a930
add esp, 8
cmp eax, ebx
jge 0x410353
push eax
push str.zlib_inflate_error:__d_n
push ebx
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret 4
mov cx, word [esi + 0x41e0]
mov al, byte [esi + 0x41e6]
mov dl, byte [esi + 0x41e7]
mov word [esp + 0x30], cx
mov cl, byte [esi + 0x41e8]
mov byte [esp + 0x13], al
mov ax, word [esi + 0x41e2]
mov byte [esp + 0x12], dl
mov dx, word [esi + 0x41e4]
mov byte [esp + 0x6c], cl
lea ecx, [esi + 0x1e4]
mov word [esp + 0x28], ax
mov word [esp + 0x2c], dx
mov dword [esp + 0x40], ecx
call fcn.004181a0
mov eax, dword [esi + 0x3a1c]
mov ebp, dword [esi + 0x3a20]
push eax
push ebp
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x60], ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x3a24]
mov ebx, dword [esi + 0x3a20]
push 0
push eax
push ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [esp + 0x50], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
movzx eax, byte [esi + 0x41dc]
lea ecx, [eax - 8]
cmp ecx, 0x18
mov byte [esp + 0x64], 2
ja case.0x410410.9
movzx ecx, byte [ecx + 0x41082c]
jmp dword [ecx*4 + 0x41081c]
movzx eax, word [edi + 2]
movzx ecx, word [edi + 6]
mov edx, dword [esi + 0x274]
add ecx, eax
cmp eax, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
jge 0x4107a3
movzx eax, word [edi]
movzx edx, word [edi + 4]
lea ecx, [edx + eax]
cmp eax, ecx
mov dword [esp + 0x3c], eax
jge 0x41051e
movzx eax, byte [esp + 0x6c]
movzx ecx, byte [esp + 0x12]
movzx edx, byte [esp + 0x13]
movzx ebx, word [esp + 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea ecx, [ecx]
mov eax, dword [esp + 0x24]
movzx ebp, byte [eax]
mov ecx, dword [esp + 0x14]
mov eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x18]
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x48], eax
mov eax, ebp
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ecx, al
mov eax, dword [esp + 0x48]
or eax, ecx
mov ecx, dword [esp + 0x1c]
shl eax, 8
mov dword [esp + 0x48], eax
mov eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ebp, dword [esp + 0x3c]
mov ecx, dword [esi + 0x3a20]
movzx edx, al
mov eax, dword [esp + 0x48]
or eax, edx
push eax
mov eax, dword [esp + 0x24]
push eax
push ebp
push ecx
call dword [sym.imp.GDI32.dll_SetPixelV]
mov ecx, dword [esp + 0x24]
movzx eax, word [edi]
movzx edx, word [edi + 4]
inc ecx
mov dword [esp + 0x24], ecx
inc ebp
lea ecx, [edx + eax]
cmp ebp, ecx
mov dword [esp + 0x3c], ebp
jl 0x410470
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
movzx ebp, word [edi + 2]
inc edx
mov dword [esp + 0x20], edx
movzx edx, word [edi + 6]
add edx, ebp
cmp dword [esp + 0x20], edx
jl 0x410441
jmp 0x41079f
mov eax, dword [esi + 0x274]
movzx ecx, word [edi + 6]
mov dword [esp + 0x24], eax
movzx eax, word [edi + 2]
add ecx, eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jge 0x4107a3
movzx eax, word [edi]
movzx edx, word [edi + 4]
lea ecx, [edx + eax]
lea ebx, [ebx]
cmp eax, ecx
mov dword [esp + 0x3c], eax
jge 0x410650
movzx eax, byte [esp + 0x6c]
movzx ecx, byte [esp + 0x12]
movzx edx, byte [esp + 0x13]
movzx ebx, word [esp + 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea esp, [esp]
mov eax, dword [esp + 0x24]
movzx ebp, word [eax]
mov ecx, dword [esp + 0x14]
mov eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x18]
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x48], eax
mov eax, ebp
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ecx, al
mov eax, dword [esp + 0x48]
or eax, ecx
mov ecx, dword [esp + 0x1c]
shl eax, 8
mov dword [esp + 0x48], eax
mov eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ebp, dword [esp + 0x3c]
mov ecx, dword [esi + 0x3a20]
movzx edx, al
mov eax, dword [esp + 0x48]
or eax, edx
push eax
mov eax, dword [esp + 0x24]
push eax
push ebp
push ecx
call dword [sym.imp.GDI32.dll_SetPixelV]
mov ecx, dword [esp + 0x24]
movzx eax, word [edi]
movzx edx, word [edi + 4]
add ecx, 2
mov dword [esp + 0x24], ecx
inc ebp
lea ecx, [edx + eax]
cmp ebp, ecx
mov dword [esp + 0x3c], ebp
jl 0x4105a0
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
movzx ebp, word [edi + 2]
inc edx
mov dword [esp + 0x20], edx
movzx edx, word [edi + 6]
add edx, ebp
cmp dword [esp + 0x20], edx
jl 0x410570
jmp 0x41079f
mov eax, dword [esi + 0x274]
movzx ecx, word [edi + 6]
mov dword [esp + 0x24], eax
movzx eax, word [edi + 2]
add ecx, eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jge 0x4107a3
movzx eax, word [edi]
movzx edx, word [edi + 4]
lea ecx, [edx + eax]
lea esp, [esp]
cmp eax, ecx
mov dword [esp + 0x3c], eax
jge 0x410782
movzx eax, byte [esp + 0x6c]
movzx ecx, byte [esp + 0x12]
movzx edx, byte [esp + 0x13]
movzx ebx, word [esp + 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea esp, [esp]
mov eax, dword [esp + 0x24]
mov ebp, dword [eax]
mov ecx, dword [esp + 0x14]
mov eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x2c]
and eax, ecx
imul eax, eax, 0xff
xor edx, edx
div ecx
mov ecx, dword [esp + 0x18]
xor edx, edx
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x48], eax
mov eax, ebp
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
div ebx
xor edx, edx
movzx ecx, al
mov eax, dword [esp + 0x48]
or eax, ecx
mov ecx, dword [esp + 0x1c]
shl eax, 8
mov dword [esp + 0x48], eax
mov eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
div ecx
mov ebp, dword [esp + 0x3c]
mov ecx, dword [esi + 0x3a20]
movzx edx, al
mov eax, dword [esp + 0x48]
or eax, edx
push eax
mov eax, dword [esp + 0x24]
push eax
push ebp
push ecx
call dword [sym.imp.GDI32.dll_SetPixelV]
mov ecx, dword [esp + 0x24]
movzx eax, word [edi]
movzx edx, word [edi + 4]
add ecx, 4
mov dword [esp + 0x24], ecx
inc ebp
lea ecx, [edx + eax]
cmp ebp, ecx
mov dword [esp + 0x3c], ebp
jl 0x4106d0
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
movzx ebp, word [edi + 2]
inc edx
mov dword [esp + 0x20], edx
movzx edx, word [edi + 6]
add edx, ebp
cmp dword [esp + 0x20], edx
jl 0x4106a0
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x4c]
push 0
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esp + 0x54]
push ecx
jmp 0x4107ee
push eax
push str.Invalid_number_of_bits_per_pixel:__d_n
push 0
push 0x445ec8
call fcn.00403360
mov edx, dword [esp + 0x5c]
add esp, 0x10
push 0
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esp + 0x54]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x64], 0xffffffff
call fcn.004181b0
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x58
ret 4