Function at 0x404940
Capabilities:
Encode data using xor
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f29d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x429040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00403950
test al, al
jne 0x404b7f
call fcn.004036f0
test al, al
jne 0x404b7f
push 0xa
push 7
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [0x42a720]
mov edi, eax
mov eax, dword [0x42a724]
mov ecx, eax
sub ecx, edx
mov dword [ebp - 0x30], eax
cmp edi, ecx
jae 0x4049de
lea ecx, [edx + edi]
mov dword [0x42a724], ecx
jmp 0x404a10
jbe 0x404a10
mov eax, dword [0x42a728]
sub eax, edx
cmp edi, eax
jbe 0x4049f4
push ecx
push edi
call fcn.00404c00
jmp 0x404a10
mov esi, edi
sub esi, ecx
push esi
push 0
push dword [ebp - 0x30]
call fcn.00409100
mov eax, dword [ebp - 0x30]
add esp, 0xc
add eax, esi
mov dword [0x42a724], eax
push edi
push dword [ebp - 0x34]
push dword [0x42a720]
call fcn.00409350
add esp, 0xc
call fcn.00403950
test al, al
jne 0x404b7f
call fcn.004036f0
test al, al
jne 0x404b7f
lea ecx, [ebp - 0x50]
call fcn.00404790
sub esp, 0x18
mov dword [ebp - 4], 0
lea eax, [ebp - 0x50]
mov ecx, esp
push eax
call fcn.00402aa0
call fcn.00403c70
mov edx, eax
mov dword [ebp - 0x1c], 0
mov ecx, edx
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
add esp, 0x18
movups xmmword [ebp - 0x2c], xmm0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404a80
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.00401900
mov eax, dword [0x42a724]
xor esi, esi
mov ecx, dword [0x42a720]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
sub eax, ecx
je 0x404adf
nop word [eax + eax]
cmp dword [ebp - 0x18], 0xf
lea ecx, [ebp - 0x2c]
mov eax, esi
cmova ecx, edi
xor edx, edx
div dword [ebp - 0x1c]
mov al, byte [edx + ecx]
mov ecx, dword [ebp - 0x30]
xor byte [esi + ecx], al
inc esi
mov eax, dword [0x42a724]
mov ecx, dword [0x42a720]
sub eax, ecx
mov dword [ebp - 0x30], ecx
cmp esi, eax
jne 0x404ab0
mov eax, dword [ebp - 0x18]
cmp eax, 0xf
jbe 0x404b12
lea ecx, [eax + 1]
mov eax, edi
cmp ecx, 0x1000
jb 0x404b08
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404b9f
push ecx
push edi
call fcn.0040779d
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x3c]
cmp ecx, 0xf
jbe 0x404b49
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404b3f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404b9f
push ecx
push edx
call fcn.0040779d
add esp, 8
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0xf
mov byte [ebp - 0x50], 0
call fcn.00403950
test al, al
jne 0x404b7f
call fcn.004036f0
test al, al
jne 0x404b7f
mov eax, dword [0x42a724]
sub eax, dword [0x42a720]
je 0x404b7f
call fcn.00404170
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040730e
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0040b190
int3