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

Disassembly:
push 0xffffffffffffffff
push 0x438a58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
push esi
push edi
push 0x218
mov esi, ecx
call fcn.004046e0
push 0x218
mov ecx, esi
call fcn.004047e0
mov al, byte [esi + 0x41e6]
mov cx, word [esi + 0x41e0]
mov edi, dword [esp + 0x7c]
mov dl, byte [esi + 0x41e7]
mov byte [esp + 0xa], al
mov ax, word [esi + 0x41e2]
mov word [esp + 0x3c], cx
mov cl, byte [esi + 0x41e8]
mov word [esp + 0x34], ax
mov eax, dword [esp + 0x84]
mov byte [esp + 8], cl
lea ecx, [edi + eax]
cmp edi, ecx
mov byte [esp + 9], dl
mov dx, word [esi + 0x41e4]
mov word [esp + 0x38], dx
mov dword [esp + 0x10], edi
mov dword [esp + 0x54], ecx
jge 0x412404
mov edx, dword [esp + 0x78]
lea ecx, [esi + 0x1e4]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x80]
push ebx
add edx, ecx
push ebp
mov dword [esp + 0x48], edx
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x4c]
call fcn.004181a0
mov eax, dword [esi + 0x3a1c]
mov ebp, dword [esi + 0x3a20]
push eax
push ebp
mov dword [esp + 0x80], 0
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x74], ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x68], eax
mov eax, dword [esi + 0x3a24]
mov ebx, dword [esi + 0x3a20]
push 0
push eax
push ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x70], ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [esp + 0x64], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esp + 0x80]
cmp eax, dword [esp + 0x48]
mov byte [esp + 0x78], 2
mov dword [esp + 0x84], eax
jge 0x4123aa
mov eax, dword [esp + 0x88]
mov dword [esp + 0x30], eax
jmp 0x412210
mov eax, dword [esp + 0x30]
mov edi, edi
mov ebp, 0x10
cmp eax, ebp
mov ebx, ebp
jge 0x41221d
mov ebx, eax
mov eax, dword [esp + 0x34]
cmp eax, 0x10
jge 0x412228
mov ebp, eax
push 1
lea edx, [esp + 0x17]
push edx
mov ecx, esi
call fcn.00404470
mov al, byte [esp + 0x13]
test al, 1
je 0x412417
mov ecx, dword [esi + 0x1c4]
mov eax, ebp
imul eax, ebx
shl eax, 1
push eax
push ecx
mov ecx, esi
call fcn.00404470
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0x1c4]
lea ecx, [eax + ebp]
cmp eax, ecx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], ecx
jge 0x412376
mov ebp, dword [esp + 0x84]
lea eax, [ebx + ebp]
mov dword [esp + 0x28], eax
lea ebx, [ebx]
cmp ebp, eax
jge 0x412369
movzx eax, byte [esp + 0x10]
movzx ecx, byte [esp + 0x11]
movzx edx, byte [esp + 0x12]
movzx ebx, word [esp + 0x3c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
jmp 0x4122c0
mov eax, dword [esp + 0x8c]
movzx edi, word [eax]
mov ecx, dword [esp + 0x1c]
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x40]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x50], eax
mov eax, edi
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ecx, al
mov eax, dword [esp + 0x50]
or eax, ecx
mov ecx, dword [esp + 0x24]
shl eax, 8
mov dword [esp + 0x50], eax
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x44]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov edi, dword [esp + 0x38]
movzx edx, al
mov eax, dword [esp + 0x50]
or eax, edx
push eax
mov eax, dword [esi + 0x3a20]
push edi
push ebp
push eax
call dword [sym.imp.GDI32.dll_SetPixelV]
add dword [esp + 0x8c], 2
mov eax, dword [esp + 0x28]
inc ebp
cmp ebp, eax
jl 0x4122c0
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x84]
inc edi
cmp edi, ecx
mov dword [esp + 0x38], edi
jl 0x412290
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
add eax, 0x10
sub edx, 0x10
cmp eax, ecx
mov dword [esp + 0x84], eax
mov dword [esp + 0x30], edx
jl 0x41220a
mov ebp, dword [esp + 0x54]
mov ebx, dword [esp + 0x58]
mov ecx, dword [esp + 0x60]
push 0
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [esp + 0x64], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [esp + 0x68]
push edx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x68], eax
mov dword [esp + 0x78], 0xffffffff
call fcn.004181b0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x5c]
add edi, 0x10
sub ecx, 0x10
cmp edi, eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x34], ecx
jl 0x412183
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x6c
ret 0x10
test al, 0x20
je 0x41259b
push 2
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call fcn.00404470
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x1c4]
movzx dx, ah
mov dh, al
mov eax, edx
mov dword [esp + 0x14], eax
movzx eax, ax
push eax
push ecx
mov ecx, esi
call fcn.00404470
mov eax, ebp
imul eax, ebx
lea edx, [esi + 0x2b8]
push edx
movzx edx, word [esp + 0x18]
lea ecx, [eax + eax + 4]
mov eax, dword [esi + 0x274]
push ecx
mov ecx, dword [esi + 0x1c4]
push edx
push eax
push ecx
mov ecx, esi
call fcn.00410850
test al, al
je 0x41237a
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0x274]
lea ecx, [eax + ebp]
cmp eax, ecx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], ecx
jge 0x412376
mov ebp, dword [esp + 0x84]
lea eax, [ebx + ebp]
mov dword [esp + 0x28], eax
cmp ebp, eax
jge 0x412589
movzx eax, byte [esp + 0x10]
movzx ecx, byte [esp + 0x11]
movzx edx, byte [esp + 0x12]
movzx ebx, word [esp + 0x3c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
lea ecx, [ecx]
mov eax, dword [esp + 0x8c]
movzx edi, word [eax]
mov ecx, dword [esp + 0x1c]
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x40]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x50], eax
mov eax, edi
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ecx, al
mov eax, dword [esp + 0x50]
or eax, ecx
mov ecx, dword [esp + 0x24]
shl eax, 8
mov dword [esp + 0x50], eax
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x44]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov edi, dword [esp + 0x38]
movzx edx, al
mov eax, dword [esp + 0x50]
or eax, edx
push eax
mov eax, dword [esi + 0x3a20]
push edi
push ebp
push eax
call dword [sym.imp.GDI32.dll_SetPixelV]
add dword [esp + 0x8c], 2
mov eax, dword [esp + 0x28]
inc ebp
cmp ebp, eax
jl 0x4124e0
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x84]
inc edi
cmp edi, ecx
mov dword [esp + 0x38], edi
jl 0x4124b5
jmp 0x412376
test al, 0x40
je 0x41262b
push 2
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call fcn.00404470
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x1c4]
movzx dx, ah
mov dh, al
mov eax, edx
mov dword [esp + 0x14], eax
movzx eax, ax
push eax
push ecx
mov ecx, esi
call fcn.00404470
mov eax, ebp
imul eax, ebx
lea edx, [esi + 0x2f0]
push edx
movzx edx, word [esp + 0x18]
lea ecx, [eax + eax + 0x18]
mov eax, dword [esi + 0x274]
push ecx
mov ecx, dword [esi + 0x1c4]
push edx
push eax
push ecx
mov ecx, esi
call fcn.00410850
test al, al
je 0x41237a
mov edx, dword [esi + 0x274]
movzx eax, byte [esp + 0x13]
mov ecx, dword [esp + 0x84]
push edx
push eax
push ebp
push ebx
push edi
push ecx
mov ecx, esi
call fcn.00411230
jmp 0x41237a
movzx edx, al
mov eax, dword [esp + 0x84]
push edx
push ebp
push ebx
push edi
push eax
mov ecx, esi
call fcn.00410f00
jmp 0x41237a