Function at 0x410429
Capabilities:
Allocate or change rwx memory
Encode data using xor

Disassembly:
push edi
pushfd
push ebp
mov ebp, esp
sub esp, 0x68
mov dword [ebp - 0x60], eax
lea eax, [ebp + 4]
mov dword [ebp - 0x58], ecx
sub eax, 4
mov ecx, 0xfffffff
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x64], esi
lea esi, [eax + 0xc]
mov dword [ebp - 0x68], edi
mov edi, dword [esi]
mov ebx, dword [edi + 4]
mov dword [ebp - 0x48], eax
mov eax, dword [edi]
and eax, ecx
and ebx, ecx
mov ecx, dword [0x406ab8]
xor edx, edx
mov dword [ebp - 0x28], ecx
lea ecx, [ecx + eax - 1]
mov eax, ecx
div dword [ebp - 0x28]
mov eax, dword [0x406ab8]
add ebx, 0x400000
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x44], ebx
sub ecx, edx
mov dword [ebp - 0x1c], ecx
mov eax, dword [0x431be8]
mov dword [ebp - 0x34], eax
mov eax, dword [0x406ab8]
mov eax, dword [0x431be8]
test eax, eax
je 0x41053a
and dword [ebp - 0x24], 0
mov eax, dword [0x431be8]
dec eax
lea ecx, [eax + 1]
mov dword [ebp - 0x18], ecx
xor eax, eax
test ecx, ecx
je 0x4104e3
mov edx, dword [0x4447a0]
shr dword [ebp - 0x18], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x4447a0], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x18], 0
jne 0x4104b9
xor edx, edx
div ecx
cmp dword [ebp - 0x34], 0
mov dword [ebp - 0x18], edx
jbe 0x41052c
inc dword [ebp - 0x24]
lea edx, [edx*4 + 0x443368]
mov eax, 0xf443
mov ecx, 0xffff0bbc
lock cmpxchg dword [edx], ecx
cmp eax, 0xf443
je 0x41068a
mov eax, dword [ebp - 0x18]
mov ecx, dword [0x431be8]
inc eax
xor edx, edx
div ecx
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], edx
cmp eax, dword [ebp - 0x34]
jb 0x4104f0
and dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
jne 0x4105c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x18], 0
mov dword [ebp - 0x28], eax
inc dword [ebp - 0x18]
push 0x40
push 0x1000
push dword [ebp - 0x1c]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x4106a1
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x18], 0x11
jb 0x410547
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
cmp dword [0x444788], eax
ja 0x410584
test al, 3
je 0x41059c
test eax, eax
je 0x410598
push 0x8000
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
and dword [ebp - 0x14], 0
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0x14], 0
je 0x410489
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
test ecx, ecx
je 0x4105c0
mov byte [eax], 0
inc eax
dec ecx
jne 0x4105b9
mov eax, 0x66f447ee
add dword [esi], 8
mov esi, dword [edi]
mov eax, dword [0x406ab8]
mov dword [ebp - 0x30], ebx
and esi, 0xfffffff
lea edi, [esi + ebx]
sub eax, esi
lea ecx, [eax + 1]
sub dword [ebp - 0x30], 0x400000
xor eax, eax
mov edx, ecx
mov dword [ebp - 0x18], esi
test ecx, ecx
mov dword [ebp - 0x50], edi
je 0x41061c
mov ebx, dword [0x4447a0]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x4447a0], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x4105f5
xor edx, edx
div ecx
mov eax, dword [ebp - 0x14]
lea ebx, [edx + eax]
push ebx
push esi
push dword [ebp - 0x30]
mov dword [ebp - 0x34], ebx
mov eax, 0x6e5ff882
mov edx, dword [edi + 4]
mov eax, dword [edi]
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0xc], eax
mov eax, esi
add esp, 0xc
and eax, 7
mov byte [ebp - 0xd], 0
mov dword [ebp - 8], edx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], eax
je 0x410a9d
mov ebx, dword [ebp - 0x30]
not ebx
xor ecx, ecx
mov dword [ebp - 0x24], ecx
cmp eax, ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x14], ecx
jle 0x4106bb
mov dword [ebp - 0x20], 0x38
movzx esi, byte [edi]
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x14], 4
jge 0x4106a9
add ecx, 0xffffffe0
shl esi, cl
or dword [ebp - 0x38], esi
jmp 0x4106ae
mov eax, dword [0x406ab8]
imul eax, dword [ebp - 0x18]
lea eax, [eax + section..data]
mov dword [ebp - 0x14], eax
jmp 0x410530
mov dword [ebp - 0x14], eax
jmp 0x410575
shl esi, cl
or dword [ebp - 0x24], esi
sub dword [ebp - 0x20], 8
inc edi
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], eax
jl 0x410674
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
xor eax, edx
sub ecx, eax
movzx eax, dx
xor ebx, ecx
mov esi, ebx
movzx ecx, word [ebp - 6]
xor ecx, ebx
rol ecx, 1
imul eax, ecx
movzx ecx, word [ebp - 0xa]
ror esi, 8
sub eax, esi
xor eax, dword [ebp - 0x30]
mov esi, eax
sub esi, ecx
mov ecx, edx
xor esi, ebx
xor esi, edx
mov ebx, esi
movzx edx, word [ebp - 0xc]
sub ecx, esi
ror ecx, 5
imul edx, ecx
rol ebx, 0xe
mov ecx, dword [ebp - 0xc]
add ebx, edx
xor eax, ebx
mov ebx, eax
movzx edx, word [ebp - 6]
sub ecx, eax
ror ecx, 3
imul edx, ecx
ror ebx, 0xa
xor ebx, edx
movzx edx, word [ebp - 0xa]
xor esi, ebx
mov ecx, esi
sub ecx, edx
rol ecx, 2
movzx ebx, word [ebp - 8]
imul ebx, ecx
mov ecx, esi
shr ecx, 4
xor ebx, ecx
mov ecx, dword [ebp - 8]
xor eax, ebx
sub ecx, eax
mov ebx, eax
rol ecx, 0xd
imul ecx, edx
rol ebx, 7
sub ecx, ebx
xor esi, ecx
mov ebx, esi
movzx ecx, word [ebp - 8]
mov edx, ecx
movzx ecx, word [ebp - 0xc]
xor edx, esi
imul edx, ecx
shr ebx, 0xa
add edx, ebx
mov ebx, ecx
movzx ecx, word [ebp - 6]
xor eax, edx
mov edx, eax
xor ebx, eax
imul ebx, ecx
ror edx, 0xd
xor edx, ebx
xor esi, edx
movzx edx, word [ebp - 8]
mov ebx, esi
mov ecx, esi
xor ecx, dword [ebp - 0xc]
ror ecx, 0xb
imul ecx, edx
movzx edx, word [ebp - 0xa]
rol ebx, 0xb
add ebx, ecx
xor eax, ebx
mov ebx, eax
mov ecx, eax
xor ecx, dword [ebp - 8]
ror ecx, 2
imul ecx, edx
movzx edx, word [ebp - 0xc]
ror ebx, 5
xor ebx, ecx
and dword [ebp - 0x14], 0
xor esi, ebx
mov ecx, esi
mov ebx, esi
sub ecx, dword [ebp - 8]
xor esi, dword [ebp - 0x24]
ror ecx, 0xa
imul ecx, edx
ror ebx, 0xe
sub ecx, ebx
mov ebx, dword [ebp - 0x1c]
xor ecx, dword [ebp - 0x38]
xor eax, ecx
mov dword [ebp - 0x20], eax
mov ecx, esi
test ebx, ebx
jle 0x410806
cmp dword [ebp - 0x14], 4
jge 0x4107ed
rol dword [ebp - 0x20], 8
mov dl, byte [ebp - 0x20]
mov ebx, dword [ebp - 0x2c]
inc dword [ebp - 0x2c]
xor byte [ebp - 0xd], dl
mov byte [ebx], dl
jmp 0x4107fb
mov edx, dword [ebp - 0x2c]
inc dword [ebp - 0x2c]
rol ecx, 8
xor byte [ebp - 0xd], cl
mov byte [edx], cl
inc dword [ebp - 0x14]
mov ebx, dword [ebp - 0x1c]
cmp dword [ebp - 0x14], ebx
jl 0x4107d3
add ebx, 0xfffffffc
test ebx, ebx
jle 0x410a83
push 4
pop ecx
sub ecx, ebx
shl ecx, 3
shr esi, cl
shl esi, cl
mov edx, esi
mov esi, dword [ebp - 0x18]
shr esi, 3
test esi, esi
jbe 0x4109ed
movzx ecx, word [ebp - 0xa]
mov dword [ebp - 0x14], ecx
neg dword [ebp - 0x14]
mov dword [ebp - 0x1c], ecx
movzx ecx, word [ebp - 6]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x28], esi
movzx ebx, byte [edi + 5]
movzx ecx, byte [edi]
movzx esi, byte [edi + 1]
shl ecx, 8
or esi, ecx
shl esi, 8
movzx ecx, byte [edi + 2]
or esi, ecx
shl esi, 8
movzx ecx, byte [edi + 3]
or esi, ecx
movzx ecx, byte [edi + 4]
shl ecx, 8
or ecx, ebx
shl ecx, 8
movzx ebx, byte [edi + 6]
or ecx, ebx
movzx ebx, byte [edi + 7]
shl ecx, 8
or ecx, ebx
mov ebx, dword [ebp - 0xc]
xor eax, esi
mov dword [ebp - 0x20], esi
mov esi, eax
mov dword [ebp - 0x4c], ecx
xor esi, dword [ebp - 8]
add edi, 8
sub ebx, esi
xor ebx, ecx
movzx esi, word [ebp - 8]
mov ecx, dword [ebp - 0x40]
xor edx, ebx
mov ebx, edx
xor ecx, edx
rol ecx, 1
imul ecx, esi
ror ebx, 8
sub ecx, ebx
xor eax, ecx
mov ecx, dword [ebp - 8]
mov esi, eax
sub esi, dword [ebp - 0x1c]
xor esi, edx
xor esi, ecx
mov edx, esi
movzx esi, word [ebp - 0xc]
mov ebx, edx
sub ecx, edx
ror ecx, 5
imul ecx, esi
rol ebx, 0xe
add ebx, ecx
xor eax, ebx
mov ecx, dword [ebp - 0xc]
mov esi, eax
sub ecx, eax
ror ecx, 3
imul ecx, dword [ebp - 0x40]
ror esi, 0xa
xor esi, ecx
mov ecx, dword [ebp - 0x14]
xor edx, esi
movzx esi, word [ebp - 8]
add ecx, edx
rol ecx, 2
imul ecx, esi
mov esi, edx
shr esi, 4
xor ecx, esi
xor eax, ecx
mov esi, eax
mov ecx, dword [ebp - 8]
sub ecx, eax
rol ecx, 0xd
imul ecx, dword [ebp - 0x1c]
rol esi, 7
sub ecx, esi
xor edx, ecx
movzx ecx, word [ebp - 8]
mov ebx, edx
mov esi, ecx
movzx ecx, word [ebp - 0xc]
xor esi, edx
imul esi, ecx
shr ebx, 0xa
add esi, ebx
xor eax, esi
mov esi, eax
xor ecx, eax
imul ecx, dword [ebp - 0x40]
ror esi, 0xd
xor esi, ecx
xor edx, esi
movzx esi, word [ebp - 8]
mov ecx, edx
xor ecx, dword [ebp - 0xc]
mov ebx, edx
ror ecx, 0xb
imul ecx, esi
rol ebx, 0xb
add ebx, ecx
xor eax, ebx
mov esi, eax
mov ecx, eax
xor ecx, dword [ebp - 8]
ror ecx, 2
imul ecx, dword [ebp - 0x1c]
ror esi, 5
xor esi, ecx
xor edx, esi
mov ecx, edx
mov ebx, edx
movzx esi, word [ebp - 0xc]
sub ecx, dword [ebp - 8]
xor edx, dword [ebp - 0x24]
ror ecx, 0xa
imul ecx, esi
mov esi, dword [ebp - 0x2c]
ror ebx, 0xe
sub ecx, ebx
xor ecx, dword [ebp - 0x38]
xor eax, ecx
mov byte [esi + 7], dl
mov cl, byte [ebp - 0xd]
xor cl, al
mov byte [esi + 3], al
xor cl, dl
ror eax, 8
xor cl, al
ror edx, 8
xor cl, dl
mov byte [esi + 2], al
mov byte [esi + 6], dl
ror eax, 8
xor cl, al
ror edx, 8
xor cl, dl
mov byte [esi + 1], al
ror eax, 8
mov byte [esi + 5], dl
ror edx, 8
mov bl, dl
xor bl, al
xor cl, bl
mov byte [ebp - 0xd], cl
mov ecx, dword [ebp - 0x20]
mov byte [esi], al
mov byte [esi + 4], dl
add esi, 8
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x4c]
dec dword [ebp - 0x28]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], esi
ror eax, 8
ror edx, 8
jne 0x410844
mov cl, byte [ebp - 0xd]
mov eax, dword [ebp - 0x50]
cmp cl, byte [eax + 8]
je 0x410ab1
call fcn.00405ddc
mov edx, 0xffff
mov esi, eax
mov ecx, dword [ebp - 0x3c]
mov eax, 0xfffff000
and ecx, 0xfffffffc
mov edi, ecx
lea ecx, [edi + 0xfff]
and esi, eax
and ecx, eax
mov eax, dword [ebp - 0x48]
mov dword [eax + 8], 0x427ab0
xor eax, eax
mov ebx, dword [0x4447a0]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x4447a0], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x410a2b
mov ebx, 0xffff
div ebx
mov eax, edi
mov dword [ebp - 0x5c], esi
inc edx
cmp edi, ecx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x3c], 0
jae 0x410a79
mov edx, dword [ebp - 0x3c]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jb 0x410a6d
mov eax, 0x427ab0
jmp 0x410b82
xor edx, edx
test ebx, ebx
jge 0x41081f
neg ebx
shl ebx, 3
mov ecx, ebx
shr eax, cl
shl eax, cl
jmp 0x41081f
xor edx, edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
not eax
mov dword [ebp - 0x24], eax
xor eax, eax
jmp 0x410822
mov ecx, 0x400000
mov eax, dword [ebp - 0x44]
mov edx, dword [0x421858]
sub eax, dword [ebp - 0x34]
sub ecx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
jne 0x410ad4
test eax, eax
je 0x410b75
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x30]
mov ecx, dword [0x4177a0]
mov esi, dword [ebp - 0x34]
sub esi, dword [ebp - 0x44]
add eax, ebx
mov dword [ebp - 0x3c], eax
xor edi, edi
dec ecx
js 0x410b17
lea eax, [edi + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x4177a4]
and edx, 0xfffffff
cmp ebx, edx
jae 0x410b0e
lea ecx, [eax - 1]
jmp 0x410b13
jbe 0x410b1b
lea edi, [eax + 1]
cmp ecx, edi
jge 0x410af0
mov ebx, edi
jmp 0x410b6d
mov ebx, eax
jmp 0x410b6d
mov eax, dword [ebx*4 + 0x4177a4]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x3c]
jae 0x410b75
lea edi, [ecx + esi + 0x400000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor edx, edx
dec ecx
je 0x410b60
dec ecx
je 0x410b5b
dec ecx
jne 0x410b66
mov edx, dword [ebp - 0x28]
jmp 0x410b66
mov edx, dword [ebp - 0x1c]
jmp 0x410b66
mov edx, dword [ebp - 0x28]
sub edx, dword [ebp - 0x1c]
dec eax
dec eax
jne 0x410b6c
add dword [edi], edx
inc ebx
cmp ebx, dword [0x4177a0]
jb 0x410b1f
mov eax, dword [0x406ab8]
mov eax, 0x59677402
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x48]
mov dword [ecx + 8], eax
mov edi, dword [ebp - 0x68]
mov ebx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x64]
mov eax, dword [ebp - 0x60]
mov esp, ebp
pop ebp
popfd
ret