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

Disassembly:
push 0xffffffffffffffff
push 0x4b6ce8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x60]
mov esi, dword [esp + 0x58]
xor ebx, ebx
cmp eax, 3
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], 3
je 0x43b1ac
cmp eax, 4
jne 0x43b1b0
mov dword [esp + 0x64], ebx
cmp dword [esp + 0x5c], ebx
je 0x43b897
mov edi, dword [esp + 0x68]
mov ebp, 1
cmp edi, ebx
jne 0x43b242
mov eax, dword [esp + 0x38]
push 0x18
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
cmp eax, 2
jne 0x43b234
mov dword [esp + 0x18], ebp
xor ecx, ecx
mov edx, dword [0x4d5ef0]
mov eax, ecx
neg eax
sbb al, al
and eax, 0xff
mov byte [edx + ecx*4 + 0x2a], al
mov edx, dword [0x4d5ef0]
mov byte [edx + ecx*4 + 0x29], al
mov edx, dword [0x4d5ef0]
mov byte [edx + ecx*4 + 0x28], al
mov eax, dword [0x4d5ef0]
mov byte [eax + ecx*4 + 0x2b], 0
inc ecx
cmp ecx, 2
jl 0x43b1e2
mov ecx, dword [0x4d5ef0]
mov word [ecx + 0xe], bp
mov edx, dword [0x4d5ef0]
mov dword [edx + 0x20], 2
jmp 0x43b261
mov eax, dword [0x4d5ef0]
mov dword [eax + 0x20], 8
jmp 0x43b261
mov ecx, dword [0x4d5ef0]
cmp word [ecx + 0xe], 0x18
jne 0x43b261
lea eax, [esi + esi*2 + 3]
cdq
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
shl esi, 2
lea eax, [esi + 3]
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0x54]
mov ecx, eax
sar ecx, 2
lea eax, [edx - 4]
xor edx, edx
shl ecx, 2
div ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x60], eax
mov eax, dword [0x4d5f24]
sub eax, ecx
mov dword [esp + 0x54], eax
jns 0x43b298
xor eax, eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x5c]
jge 0x43b897
cmp edi, ebp
jne 0x43b58e
mov esi, dword [esp + 0x4c]
mov edx, dword [0x4d5ef0]
mov dword [esp + 0x1c], esi
mov eax, dword [esi]
add esi, 2
mov dword [esp + 0x20], eax
movsx ecx, word [esi]
movsx eax, ax
mov dword [edx + 4], eax
mov edx, dword [0x4d5ef0]
mov dword [esp + 0x4c], ecx
add esi, 2
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x64]
cmp ecx, ebx
mov dword [esp + 0x68], eax
mov ebp, eax
jne 0x43b2eb
lea ebp, [eax + eax*2]
lea eax, [ebp + 3]
mov ebx, dword [esp + 0x50]
cdq
and edx, 3
mov dword [esp + 0x64], ebx
add eax, edx
mov edi, eax
mov eax, dword [esp + 0x4c]
sar edi, 2
shl edi, 2
lea ecx, [eax - 1]
imul ecx, edi
add ebx, ecx
test eax, eax
jle 0x43b332
mov dword [esp + 0x50], eax
push ebp
push esi
push ebx
call fcn.00497220
mov eax, dword [esp + 0x5c]
add esp, 0xc
add esi, ebp
sub ebx, edi
dec eax
mov dword [esp + 0x50], eax
jne 0x43b318
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x43b52a
mov ecx, dword [0x4d5ef0]
mov esi, dword [esp + 0x64]
mov ebp, dword [esp + 0x40]
mov ax, word [ecx + 0xe]
cmp ax, 8
jne 0x43b44b
mov ebx, dword [esp + 0x58]
xor dl, dl
add ecx, 0x28
mov byte [esp + 0x50], dl
mov dword [esp + 0x54], ecx
xor eax, eax
mov edi, dword [ecx]
test edi, edi
jne 0x43b384
mov cl, byte [esp + 0x50]
test cl, cl
jne 0x43b384
mov dword [esp + 0x60], eax
mov byte [esp + 0x50], 1
cmp edi, 0xffffff
jne 0x43b396
test dl, dl
jne 0x43b39a
mov ebx, eax
mov dl, 1
jmp 0x43b39a
test dl, dl
je 0x43b3a2
mov cl, byte [esp + 0x50]
test cl, cl
jne 0x43b3b5
mov ecx, dword [esp + 0x54]
inc eax
add ecx, 4
cmp eax, 0x100
mov dword [esp + 0x54], ecx
jl 0x43b36d
mov eax, dword [esp + 0x4c]
test eax, eax
jle 0x43b4e7
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x50], ecx
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 1
mov dword [esp + 0x54], eax
test eax, eax
jle 0x43b43b
mov edi, eax
mov cl, byte [esi]
mov edx, ecx
and edx, 0xff
cmp edx, ebx
je 0x43b405
cmp cl, 0xff
je 0x43b405
mov dl, byte [esp + 0x60]
mov byte [ebp], dl
jmp 0x43b410
mov al, byte [esp + 0x60]
mov byte [esi], al
mov byte [ebp], bl
mov dl, al
mov cl, byte [esi + 1]
mov eax, ecx
and eax, 0xff
cmp eax, ebx
je 0x43b428
cmp cl, 0xff
je 0x43b428
mov byte [ebp + 1], dl
jmp 0x43b42e
mov byte [esi + 1], dl
mov byte [ebp + 1], bl
add esi, 2
add ebp, 2
dec edi
jne 0x43b3e9
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
dec ecx
mov dword [esp + 0x50], ecx
jne 0x43b3e3
jmp 0x43b4e7
cmp ax, 0x18
jne 0x43b4e7
mov eax, dword [esp + 0x4c]
test eax, eax
jle 0x43b4e7
mov ecx, dword [esp + 0x68]
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x4c]
lea edx, [ecx + ecx*2]
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
jmp 0x43b489
mov ecx, dword [esp + 0x68]
test ecx, ecx
mov edx, ebx
jle 0x43b4e2
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x40]
mov ecx, ebx
sub ecx, esi
sub esi, edi
lea ecx, [ecx + edi + 2]
mov edi, dword [esp + 0x68]
cmp byte [edx], 0xff
jne 0x43b4ce
cmp byte [edx + 1], 0xff
jne 0x43b4ce
cmp byte [esi + ecx], 0xff
jne 0x43b4ce
mov byte [edx], 0
mov byte [edx + 1], 0
mov byte [esi + ecx], 0
mov byte [ecx - 2], 0xff
mov byte [ecx - 1], 0xff
mov byte [ecx], 0xff
jmp 0x43b4d9
mov byte [ecx - 2], 0
mov byte [ecx - 1], 0
mov byte [ecx], 0
add edx, 3
add ecx, 3
dec edi
jne 0x43b4a5
add ebx, eax
dec ebp
jne 0x43b485
mov edx, dword [0x4d5ef0]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
push 0xcc0020
push 0
push edx
mov edx, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x60]
push 0
push 0
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x64]
push edx
push eax
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x43b535
mov eax, dword [eax + 4]
mov ecx, dword [0x4d5ef0]
mov edx, dword [esp + 0x64]
push 0xcc0020
push 0
push ecx
mov ecx, dword [esp + 0x58]
push edx
mov edx, dword [esp + 0x78]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x70]
push 0
push 0
push ecx
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x6c]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [ecx], eax
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
mov ebx, dword [esp + 0x60]
mov ebp, dword [esp + 0x58]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
mov eax, edi
sub eax, esi
cmp eax, ebx
jge 0x43b5ac
mov ebx, eax
mov dword [esp + 0x60], ebx
mov edx, dword [0x4d5ef0]
mov dword [edx + 4], ebp
mov eax, dword [0x4d5ef0]
mov dword [eax + 8], ebx
mov eax, dword [esp + 0x68]
test eax, eax
je 0x43b5ef
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x50]
neg ecx
sbb ecx, ecx
lea eax, [edx + 4]
and ecx, 0xfffffffe
add ecx, 3
push ecx
push ebx
push esi
push edi
push ebp
push eax
mov eax, dword [esp + 0x64]
push eax
call fcn.0043d170
add esp, 0x1c
jmp 0x43b64a
mov eax, dword [esp + 0x64]
test eax, eax
je 0x43b622
mov ecx, dword [esp + 0x48]
lea edx, [esi + ecx]
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x44]
push ebx
push esi
push edi
push ebp
push edx
push eax
push ecx
call fcn.0043cb60
add esp, 0x28
jmp 0x43b64a
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x18]
lea eax, [esi + edx]
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x40]
push ebx
push esi
push edi
push ebp
push edx
push eax
push ecx
call fcn.0043ce80
add esp, 0x24
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x43b791
mov eax, dword [0x4d5ef0]
mov edx, dword [esp + 0x50]
mov esi, dword [esp + 0x40]
mov ax, word [eax + 0xe]
lea edi, [edx + 4]
cmp ax, 8
jne 0x43b7a2
mov ecx, dword [0x4d5ef0]
xor dl, dl
xor bl, bl
xor eax, eax
lea ebp, [ecx + 0x28]
mov ecx, dword [ebp]
test ecx, ecx
jne 0x43b694
test bl, bl
jne 0x43b694
mov dword [esp + 0x10], eax
mov bl, 1
cmp ecx, 0xffffff
jne 0x43b6a8
test dl, dl
jne 0x43b6ac
mov dword [esp + 0x1c], eax
mov dl, 1
jmp 0x43b6ac
test dl, dl
je 0x43b6b0
test bl, bl
jne 0x43b6bb
inc eax
add ebp, 4
cmp eax, 0x100
jl 0x43b683
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x43b749
mov edx, dword [esp + 0x58]
mov dword [esp + 0x14], ecx
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 1
mov dword [esp + 0x20], eax
test eax, eax
jle 0x43b73e
mov ebp, eax
mov cl, byte [edi]
mov edx, dword [esp + 0x1c]
mov eax, ecx
and eax, 0xff
cmp eax, edx
je 0x43b709
cmp cl, 0xff
je 0x43b709
mov bl, byte [esp + 0x10]
mov byte [esi], bl
jmp 0x43b713
mov cl, byte [esp + 0x10]
mov byte [edi], cl
mov byte [esi], dl
mov bl, cl
mov cl, byte [edi + 1]
mov eax, ecx
and eax, 0xff
cmp eax, edx
je 0x43b72b
cmp cl, 0xff
je 0x43b72b
mov byte [esi + 1], bl
jmp 0x43b731
mov byte [edi + 1], bl
mov byte [esi + 1], dl
add edi, 2
add esi, 2
dec ebp
jne 0x43b6eb
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
dec ecx
mov dword [esp + 0x14], ecx
jne 0x43b6e5
mov ebx, dword [esp + 0x60]
mov ebp, dword [esp + 0x58]
mov eax, dword [0x4d5ef0]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x54]
push 0xcc0020
push 0
push eax
mov eax, dword [esp + 0x54]
push ecx
push ebx
push ebp
mov ecx, dword [esp + 0x5c]
push 0
push 0
push ebx
add edx, eax
push ebp
push edx
mov edx, dword [esp + 0x68]
push ecx
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x43b854
jmp 0x43b857
cmp ax, 0x18
jne 0x43b751
test ebx, ebx
mov dword [esp + 0x1c], 0xffffff
mov dword [esp + 0x10], 0
jle 0x43b751
lea ecx, [ebp + ebp*2]
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], ebx
lea eax, [ecx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x14]
test ebp, ebp
jle 0x43b836
mov eax, dword [esp + 0x40]
mov ecx, edx
sub ecx, edi
mov esi, edi
sub esi, eax
lea ecx, [ecx + eax + 2]
mov eax, ebp
cmp byte [edx], 0xff
jne 0x43b822
cmp byte [edx + 1], 0xff
jne 0x43b822
cmp byte [esi + ecx], 0xff
jne 0x43b822
mov byte [edx], 0
mov byte [edx + 1], 0
mov byte [esi + ecx], 0
mov byte [ecx - 2], 0xff
mov byte [ecx - 1], 0xff
mov byte [ecx], 0xff
jmp 0x43b82d
mov byte [ecx - 2], 0
mov byte [ecx - 1], 0
mov byte [ecx], 0
add edx, 3
add ecx, 3
dec eax
jne 0x43b7f9
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
add ecx, edx
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], eax
jne 0x43b7df
jmp 0x43b751
mov eax, dword [eax + 4]
mov ecx, dword [0x4d5ef0]
mov edx, dword [esp + 0x50]
push 0xcc0020
push 0
push ecx
lea ecx, [edx + 4]
push ecx
mov ecx, dword [esp + 0x58]
push ebx
push ebp
push 0
push 0
push ebx
lea edx, [esi + ecx]
mov ecx, dword [esp + 0x68]
push ebp
push edx
push ecx
push eax
call dword [sym.imp.GDI32.dll_StretchDIBits]
add esi, ebx
cmp esi, edi
mov dword [esp + 0x54], esi
jl 0x43b59e
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret