Function at 0x402ac0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x528
push ebp
push esi
push edi
mov edi, dword [esp + 0x538]
lea ecx, [esp + 0x18]
mov eax, dword [edi]
push ecx
push edi
call dword [eax + 0x90]
mov eax, dword [esp + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov esi, dword [esp + 0x53c]
lea eax, [esp + 0x24]
push eax
push 0x18
push esi
call dword [sym.imp.GDI32.dll_GetObjectA]
xor ebp, ebp
lea ecx, [esp + 0xb8]
push ebp
push ebp
push ecx
call fcn.00405a30
mov edx, dword [edi]
add esp, 0xc
lea eax, [esp + 0xb8]
push eax
push edi
call dword [edx + 0x58]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc0], edx
lea edx, [esp + 0x10]
push ebp
push edx
lea edx, [esp + 0xc0]
mov dword [esp + 0xc4], 0x101007
mov dword [esp + 0x128], 0x1800
mov dword [esp + 0x12c], ebp
mov dword [esp + 0xcc], ecx
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jge 0x402b7a
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x528
ret
push ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x14], edi
jne 0x402ba1
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x528
ret
push ebx
push esi
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [esp + 0x30], ebp
jle 0x402c09
mov ebx, dword [sym.imp.GDI32.dll_GetPixel]
mov ecx, dword [esp + 0x2c]
xor esi, esi
test ecx, ecx
jle 0x402bf7
mov edi, ebp
and edi, 0xffff
xor eax, eax
mov edx, dword [esp + 0x18]
push edi
push eax
push edx
call ebx
mov ecx, dword [0x41a728]
add esi, 4
xor ecx, eax
mov eax, esi
mov dword [0x41a728], ecx
mov ecx, dword [esp + 0x2c]
and eax, 0xffff
cmp eax, ecx
jl 0x402bca
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
add ebp, 4
mov eax, ebp
and eax, 0xffff
cmp eax, edx
jl 0x402bba
cmp dword [esp + 0x110], 8
jne 0x402d1e
lea ecx, [esp + 0x138]
push ecx
push 0x100
push 0
push edi
call dword [sym.imp.GDI32.dll_GetDIBColorTable]
test ax, ax
jbe 0x402cbe
mov ebx, dword [esp + 0x544]
lea ecx, [esp + 0x138]
mov esi, ebx
mov ebp, ebx
and esi, 2
and ebp, 1
and ebx, 4
and eax, 0xffff
mov edi, eax
mov eax, dword [ecx]
xor edx, edx
mov dl, byte [ecx + 1]
mov dh, byte [ecx]
shr eax, 0x10
shl edx, 8
and eax, 0xff
or edx, eax
add edx, 0xff000000
test esi, esi
mov dword [ecx], edx
je 0x402c88
test edx, 0xffffff
jne 0x402c88
mov dword [ecx], 0
test ebp, ebp
je 0x402c9e
mov edx, dword [ecx]
and edx, 0xffffff
cmp edx, 0xffffff
jne 0x402c9e
mov dword [ecx], edx
test ebx, ebx
je 0x402cb4
mov edx, dword [ecx]
and edx, 0xffffff
cmp edx, 0xff00ff
jne 0x402cb4
mov dword [ecx], edx
add ecx, 4
dec edi
jne 0x402c58
mov edi, dword [esp + 0x18]
mov bl, byte [esp + 0x544]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push 0
mov ecx, dword [eax]
push edx
lea edx, [esp + 0x140]
test bl, 7
push edx
je 0x402ce6
push 0x404
jmp 0x402ce8
push 4
push eax
call dword [ecx + 0x14]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x7c]
mov ebp, dword [esp + 0x53c]
mov ecx, dword [esp + 0x10]
push ecx
push ebp
mov eax, dword [ebp]
call dword [eax + 0x7c]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402d2c
mov edx, dword [eax]
push eax
call dword [edx + 8]
jmp 0x402d2c
mov bl, byte [esp + 0x544]
mov ebp, dword [esp + 0x53c]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
test eax, eax
jl 0x402d71
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
push 0xcc0020
push 0
push 0
push edi
push eax
push ecx
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x68]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp]
push 0
push 0x1000000
push 0
push ecx
push 0
push ebp
call dword [eax + 0x14]
cmp dword [esp + 0x110], 8
jne 0x402dfe
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x50]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x138]
push ecx
push 0x100
mov edx, dword [eax]
push 0
push 0
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp]
lea ecx, [esp + 0x10]
push ecx
push ebp
call dword [eax + 0x50]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x138]
push ecx
push 0x100
mov edx, dword [eax]
push 0
push 0
push eax
call dword [edx + 0x18]
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x120]
test eax, eax
je 0x402f50
test bl, 7
je 0x402f50
push 0
lea edx, [esp + 0x44]
push 0
push edx
call fcn.00405a30
mov eax, dword [ebp]
add esp, 0xc
lea ecx, [esp + 0x40]
push 0
push 0
push ecx
push 0
push ebp
call dword [eax + 0x64]
cmp eax, 0x8876021c
jne 0x402e63
mov edx, dword [ebp]
push 0
lea eax, [esp + 0x44]
push 0
push eax
push 0
push ebp
call dword [edx + 0x64]
cmp eax, 0x8876021c
je 0x402e4a
mov ecx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x9c]
mov esi, eax
xor edi, edi
or esi, ecx
mov ecx, dword [esp + 0x98]
or esi, ecx
test bl, 1
je 0x402e92
mov edi, esi
test bl, 4
je 0x402e9b
or eax, ecx
mov edi, eax
mov eax, dword [esp + 0x48]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x24], ecx
jbe 0x402f44
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x64]
imul edx, ecx
mov ebx, dword [esp + 0x4c]
add eax, edx
test ebx, ebx
mov edx, eax
mov dword [esp + 0x10], 0
jbe 0x402f33
cmp dword [esp + 0x94], 0x10
jne 0x402ef9
and word [eax], si
mov cx, word [eax]
mov ebx, ecx
and ebx, 0xffff
cmp ebx, edi
je 0x402ef1
or ecx, dword [esp + 0x18]
mov word [eax], cx
jmp 0x402ef6
mov word [eax], 0
add eax, 2
cmp dword [esp + 0x94], 0x20
jne 0x402f1e
mov ecx, dword [edx]
and ecx, esi
cmp ecx, edi
mov dword [edx], ecx
je 0x402f15
or ecx, dword [esp + 0x18]
mov dword [edx], ecx
jmp 0x402f1b
mov dword [edx], 0
add edx, 4
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x4c]
inc ecx
cmp ecx, ebx
mov dword [esp + 0x10], ecx
jb 0x402ecc
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x48]
inc ecx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jb 0x402ead
mov ecx, dword [ebp]
push 0
push ebp
call dword [ecx + 0x80]
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x528
ret