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

Disassembly:
pushfd
push ebp
mov ebp, esp
sub esp, 0x8c
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x80], edx
lea eax, [ebp + 4]
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x84], esi
mov ebx, 0xfffffff
mov dword [ebp - 0x8c], edi
mov esi, dword [eax + 4]
sub eax, 4
mov edi, dword [0x109dc84]
mov dword [ebp - 0x68], eax
mov eax, dword [esi]
shr eax, 3
and eax, ebx
lea ecx, [edi + eax - 1]
xor edx, edx
mov eax, ecx
div edi
sub ecx, edx
mov eax, dword [0x109dc84]
mov dword [ebp - 0x48], ecx
mov eax, dword [0x129bea8]
mov dword [ebp - 0x4c], eax
mov eax, dword [0x109dc84]
mov eax, dword [0x129bea8]
test eax, eax
je 0x1041201
and dword [ebp - 0x34], 0
mov eax, dword [0x129bea8]
dec eax
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
test ecx, ecx
je 0x10411b6
mov edi, dword [0x1427a7c]
imul edi, edi, 0x343fd
add edi, 0x269ec3
mov dword [0x1427a7c], edi
shr edi, 0x10
shl eax, 0x10
or eax, edi
shr edx, 0x10
jne 0x1041191
xor edx, edx
div ecx
cmp dword [ebp - 0x4c], 0
jbe 0x10411f8
mov eax, 0x3bd7
mov ecx, 0xffffc428
inc dword [ebp - 0x34]
lea edi, [edx*4 + 0x1427d38]
lock cmpxchg dword [edi], ecx
cmp eax, 0x3bd7
je 0x1041383
mov ecx, dword [0x129bea8]
lea eax, [edx + 1]
xor edx, edx
div ecx
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x4c]
jb 0x10411c0
xor eax, eax
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x104127e
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov dword [ebp - 0x1c], eax
inc edi
push 0x40
push 0x1000
push dword [ebp - 0x48]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x1041396
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 0x11
jb 0x104120c
xor edi, edi
mov dword [ebp - 0x14], edi
cmp dword [0x144656c], edi
ja 0x1041248
test edi, 3
je 0x104125f
test edi, edi
je 0x104125a
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor edi, edi
mov dword [ebp - 0x14], edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x1041162
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x104127e
mov byte [edi], 0
inc edi
dec eax
jne 0x1041277
mov eax, 0xd680be0c
mov eax, dword [esi]
mov ecx, eax
shr eax, 3
and eax, ebx
and ecx, 7
lea ecx, [esi + ecx + 8]
mov ebx, 0x1000000
mov esi, eax
mov eax, dword [0x109dc84]
lea edi, [esi + ecx]
sub eax, esi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x48], ecx
sub dword [ebp - 0x3c], ebx
lea ecx, [eax + 1]
xor eax, eax
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x10412e4
mov edx, dword [0x1427a7c]
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x1427a7c], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
shr ecx, 0x10
jne 0x10412bf
xor edx, edx
div dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
add eax, edx
push eax
push esi
push dword [ebp - 0x3c]
mov dword [ebp - 0x34], eax
mov eax, 0xe886050d
lea eax, [ebp - 0x74]
mov esi, dword [edi]
mov edi, dword [edi + 4]
push eax
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x70], edi
mov byte [ebp - 0xd], 0
mov eax, 0x674d529a
mov edx, dword [0x13ca1e8]
mov eax, 0xfffffff
and esi, eax
and edi, eax
xor ecx, ecx
add esp, 0x10
add esi, ebx
mov dword [ebp - 0x24], ecx
mov eax, ebx
mov dword [ebp - 0x20], ecx
sub eax, edx
mov dword [ebp - 0x2c], eax
jne 0x10413a0
cmp edi, ecx
mov dword [ebp - 0x14], ecx
jbe 0x1041574
mov ebx, 0x6993b353
mov eax, dword [ebp - 0x14]
movzx ecx, byte [eax + esi]
sub ecx, ebx
add dword [ebp - 0x24], ecx
add ecx, dword [ebp - 0x20]
mov eax, ecx
imul eax, eax, 0x81ee
rol eax, 0xd
ror ecx, 0xd
xor eax, ecx
mov ecx, 0x966c4cad
mul ecx
add eax, edx
add dword [ebp - 0x24], eax
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], eax
jb 0x1041348
jmp 0x1041574
mov eax, dword [0x109dc84]
imul eax, edx
lea eax, [eax + section..data]
jmp 0x10411fa
mov edi, eax
mov dword [ebp - 0x14], eax
jmp 0x1041238
mov ecx, esi
lea eax, [edi + esi]
mov edx, dword [0x100003c]
lea edx, [edx + 0x10000a0]
mov dword [ebp - 0x38], eax
mov eax, dword [edx]
add eax, ebx
sub ecx, ebx
mov edx, dword [edx + 4]
mov dword [ebp - 0x1c], edx
mov ebx, ecx
mov edx, ecx
add ecx, edi
mov edi, ecx
and edi, 0xfffff000
sub ecx, edi
and edx, 0xfffff000
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebp - 0x1c]
add ecx, eax
sub ebx, edx
cmp eax, ecx
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x5c], ecx
mov edi, eax
je 0x10413f7
cmp dword [edi], edx
jae 0x10413f7
add edi, dword [edi + 4]
cmp edi, ecx
jne 0x10413ec
and dword [ebp - 0x54], 0
cmp edi, ecx
je 0x1041427
cmp dword [edi], edx
jne 0x1041427
mov eax, dword [edi + 4]
sub eax, 8
shr eax, 1
je 0x1041427
mov ecx, dword [ebp - 0x54]
movzx ecx, word [edi + ecx*2 + 8]
and ecx, 0xfff
cmp ecx, ebx
jae 0x1041427
inc dword [ebp - 0x54]
cmp dword [ebp - 0x54], eax
jne 0x104140d
mov ebx, 0x6993b353
mov ecx, 0xfff
mov edx, dword [ebp - 0x54]
cmp edi, dword [ebp - 0x5c]
je 0x1041537
mov eax, dword [edi]
cmp eax, dword [ebp - 0x64]
ja 0x1041537
mov eax, dword [edi + 4]
add eax, 0xfffffff8
shr eax, 1
cmp edx, eax
jne 0x104146f
add edi, dword [edi + 4]
cmp edi, dword [ebp - 0x5c]
je 0x1041537
mov eax, dword [ebp - 0x64]
cmp dword [edi], eax
ja 0x1041537
xor edx, edx
jmp 0x1041448
mov eax, dword [ebp - 0x64]
cmp dword [edi], eax
jne 0x1041486
movzx eax, word [edi + edx*2 + 8]
and eax, ecx
cmp eax, dword [ebp - 0x60]
jae 0x1041537
mov eax, edx
inc edx
test word [edi + eax*2 + 8], 0xf000
mov dword [ebp - 0x54], edx
je 0x1041434
movzx eax, word [edi + eax*2 + 8]
and dword [ebp - 0x14], 0
and eax, ecx
mov ecx, dword [edi]
lea eax, [eax + ecx + 0x1000000]
mov dword [ebp - 0x28], eax
sub dword [ebp - 0x28], esi
mov dword [ebp - 0x30], eax
je 0x10414ed
mov eax, dword [ebp - 0x14]
movzx ecx, byte [eax + esi]
sub ecx, ebx
add dword [ebp - 0x24], ecx
add ecx, dword [ebp - 0x20]
mov eax, ecx
imul eax, eax, 0x81ee
rol eax, 0xd
ror ecx, 0xd
xor eax, ecx
mov ecx, 0x966c4cad
mul ecx
add eax, edx
add dword [ebp - 0x24], eax
inc dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x28]
jb 0x10414b4
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x6c], eax
xor esi, esi
movzx ecx, byte [ebp + esi - 0x6c]
sub ecx, ebx
add dword [ebp - 0x24], ecx
add ecx, dword [ebp - 0x20]
mov eax, ecx
imul eax, eax, 0x81ee
rol eax, 0xd
ror ecx, 0xd
xor eax, ecx
mov ecx, 0x966c4cad
mul ecx
add eax, edx
add dword [ebp - 0x24], eax
inc esi
cmp esi, 4
mov dword [ebp - 0x20], eax
jb 0x10414fa
mov esi, dword [ebp - 0x30]
add esi, 4
jmp 0x104142c
xor edi, edi
mov eax, dword [ebp - 0x38]
sub eax, esi
mov dword [ebp - 0x1c], eax
je 0x1041574
movzx ecx, byte [esi + edi]
sub ecx, ebx
add dword [ebp - 0x24], ecx
add ecx, dword [ebp - 0x20]
mov eax, ecx
imul eax, eax, 0x81ee
rol eax, 0xd
ror ecx, 0xd
xor eax, ecx
mov ecx, 0x966c4cad
mul ecx
add eax, edx
add dword [ebp - 0x24], eax
inc edi
cmp edi, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
jb 0x1041543
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x24]
mov byte [ebp + eax - 0xc], cl
inc eax
cmp eax, 8
jb 0x1041576
mov eax, 0x34179726
mov esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x4c]
and eax, 7
mov dword [ebp - 0x2c], eax
je 0x1041744
xor ecx, ecx
cmp eax, ecx
mov edi, dword [ebp - 0x3c]
not edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x18], ecx
jle 0x10415e3
push 0x38
pop edx
cmp dword [ebp - 0x18], 4
movzx ebx, byte [esi]
jge 0x10415d0
lea ecx, [edx - 0x20]
shl ebx, cl
or dword [ebp - 0x38], ebx
jmp 0x10415d7
mov ecx, edx
shl ebx, cl
or dword [ebp - 0x14], ebx
inc esi
inc dword [ebp - 0x18]
sub edx, 8
cmp dword [ebp - 0x18], eax
jl 0x10415bd
movzx edx, word [ebp - 6]
movzx ecx, word [ebp - 8]
mov eax, dword [ebp - 0x3c]
sub eax, edx
sub eax, dword [ebp - 0xc]
xor edi, eax
mov dword [ebp - 0x30], ecx
mov eax, edi
sub eax, ecx
xor eax, dword [ebp - 0xc]
xor eax, dword [ebp - 0x3c]
movzx ecx, word [ebp - 0xa]
mov dword [ebp - 0x18], ecx
mov ebx, eax
ror ebx, 0xe
xor ebx, ecx
imul ebx, edx
movzx ecx, word [ebp - 0xc]
xor edi, ebx
mov ebx, edi
ror ebx, 4
sub ebx, ecx
imul ebx, dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
xor eax, ebx
mov ebx, eax
mov ecx, dword [ebp - 0xc]
sub ecx, eax
rol ecx, 0xd
imul edx, ecx
rol ebx, 0xd
mov ecx, dword [ebp - 0x30]
add ebx, edx
xor edi, ebx
mov ebx, edi
mov edx, dword [ebp - 0x18]
xor edx, edi
imul edx, ecx
shr ebx, 9
xor edx, ebx
xor eax, edx
mov ebx, dword [ebp - 0x18]
mov edx, eax
xor ecx, eax
rol ecx, 1
imul ebx, ecx
mov ecx, dword [ebp - 0x18]
ror edx, 0x10
add edx, ebx
mov ebx, dword [ebp - 0x28]
xor edi, edx
xor ecx, edi
mov edx, edi
rol ecx, 5
imul ebx, ecx
rol edx, 3
movzx ecx, word [ebp - 6]
sub ebx, edx
xor eax, ebx
mov edx, eax
not edx
ror edx, 6
add edx, ecx
mov ecx, dword [ebp - 0x30]
imul edx, ecx
xor edi, edx
mov edx, edi
sub edx, dword [ebp - 0xc]
mov ebx, edi
rol edx, 5
imul ecx, edx
ror ebx, 2
mov edx, dword [ebp - 0x28]
add ebx, ecx
xor eax, ebx
mov ecx, dword [ebp - 0x18]
mov ebx, eax
sub ebx, edx
rol ebx, 4
imul ecx, ebx
mov ebx, eax
shr ebx, 9
xor ecx, ebx
xor edi, ecx
mov ebx, edi
mov ecx, edi
and dword [ebp - 0x18], 0
sub ecx, dword [ebp - 8]
xor edi, dword [ebp - 0x14]
rol ecx, 0xb
imul edx, ecx
ror ebx, 8
xor ebx, edx
mov ecx, edi
xor ebx, dword [ebp - 0x38]
xor eax, ebx
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
test ebx, ebx
jle 0x104171a
cmp dword [ebp - 0x18], 4
jge 0x1041701
rol dword [ebp - 0x44], 8
mov dl, byte [ebp - 0x44]
mov ebx, dword [ebp - 0x40]
inc dword [ebp - 0x40]
xor byte [ebp - 0xd], dl
mov byte [ebx], dl
jmp 0x104170f
mov edx, dword [ebp - 0x40]
inc dword [ebp - 0x40]
rol ecx, 8
xor byte [ebp - 0xd], cl
mov byte [edx], cl
inc dword [ebp - 0x18]
mov ebx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], ebx
jl 0x10416e7
add ebx, 0xfffffffc
test ebx, ebx
jle 0x1041731
push 4
pop ecx
sub ecx, ebx
shl ecx, 3
shr edi, cl
shl edi, cl
mov edx, edi
jmp 0x1041753
xor edx, edx
test ebx, ebx
jge 0x1041753
neg ebx
shl ebx, 3
mov ecx, ebx
shr eax, cl
shl eax, cl
jmp 0x1041753
xor edx, edx
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
not eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov edi, dword [ebp - 0x4c]
shr edi, 3
je 0x1041909
movzx ecx, word [ebp - 6]
mov dword [ebp - 0x28], ecx
movzx ecx, word [ebp - 0xc]
mov dword [ebp - 0x30], ecx
movzx ecx, word [ebp - 0xa]
neg dword [ebp - 0x30]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edi
xor ecx, ecx
mov ch, byte [esi]
movzx edi, byte [esi + 2]
add esi, 8
mov cl, byte [esi - 7]
shl ecx, 8
or ecx, edi
movzx edi, byte [esi - 5]
shl ecx, 8
or ecx, edi
mov dword [ebp - 0x44], ecx
movzx edi, byte [esi - 2]
xor ecx, ecx
xor eax, dword [ebp - 0x44]
mov ch, byte [esi - 4]
mov cl, byte [esi - 3]
shl ecx, 8
or ecx, edi
shl ecx, 8
movzx edi, byte [esi - 1]
or ecx, edi
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x2c], ecx
mov ecx, eax
sub ecx, dword [ebp - 0x28]
sub ecx, edi
xor ecx, dword [ebp - 0x2c]
xor edx, ecx
mov ebx, edx
movzx ecx, word [ebp - 8]
sub ebx, ecx
xor ebx, edi
xor eax, ebx
mov ecx, eax
ror ecx, 0xe
xor ecx, dword [ebp - 0x18]
imul ecx, dword [ebp - 0x28]
xor edx, ecx
mov ebx, edx
movzx ecx, di
ror ebx, 4
sub ebx, ecx
imul ebx, dword [ebp - 0x18]
xor eax, ebx
mov ebx, dword [ebp - 0x28]
mov ecx, edi
mov edi, eax
sub ecx, eax
rol ecx, 0xd
imul ebx, ecx
rol edi, 0xd
add edi, ebx
xor edx, edi
mov ebx, edx
movzx ecx, word [ebp - 8]
mov edi, dword [ebp - 0x18]
xor edi, edx
imul edi, ecx
shr ebx, 9
xor edi, ebx
xor eax, edi
mov edi, eax
xor ecx, eax
mov ebx, dword [ebp - 0x18]
rol ecx, 1
imul ebx, ecx
ror edi, 0x10
add edi, ebx
mov ecx, dword [ebp - 0x18]
xor edx, edi
xor ecx, edx
mov ebx, edx
rol ecx, 5
movzx edi, word [ebp - 0xc]
imul edi, ecx
rol ebx, 3
sub edi, ebx
xor eax, edi
movzx edi, word [ebp - 8]
mov ecx, eax
not ecx
ror ecx, 6
add ecx, dword [ebp - 0x28]
imul ecx, edi
xor edx, ecx
mov ecx, edx
mov ebx, edx
sub ecx, dword [ebp - 0xc]
rol ecx, 5
imul edi, ecx
ror ebx, 2
add ebx, edi
mov ecx, dword [ebp - 0x30]
xor eax, ebx
add ecx, eax
rol ecx, 4
mov edi, dword [ebp - 0x18]
imul edi, ecx
mov ecx, eax
shr ecx, 9
xor edi, ecx
xor edx, edi
movzx edi, word [ebp - 0xc]
mov ecx, edx
sub ecx, dword [ebp - 8]
mov ebx, edx
xor edx, dword [ebp - 0x14]
rol ecx, 0xb
imul edi, ecx
ror ebx, 8
mov cl, byte [ebp - 0xd]
xor ebx, edi
mov edi, dword [ebp - 0x40]
xor ebx, dword [ebp - 0x38]
xor eax, ebx
xor cl, al
xor cl, dl
mov byte [edi + 3], al
mov byte [edi + 7], dl
ror eax, 8
xor cl, al
mov byte [edi + 2], al
ror edx, 8
xor cl, dl
ror eax, 8
mov byte [edi + 6], dl
xor cl, al
ror edx, 8
xor cl, dl
mov byte [edi + 1], al
ror eax, 8
mov byte [edi + 5], dl
ror edx, 8
mov bl, dl
xor bl, al
xor cl, bl
mov byte [ebp - 0xd], cl
mov ecx, dword [ebp - 0x44]
mov byte [edi], al
mov byte [edi + 4], dl
add edi, 8
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x2c]
dec dword [ebp - 0x1c]
mov dword [ebp - 0x14], ecx
ror eax, 8
mov dword [ebp - 0x40], edi
ror edx, 8
jne 0x104177a
mov eax, dword [ebp - 0x50]
mov cl, byte [ebp - 0xd]
cmp cl, byte [eax + 8]
je 0x104199d
call fcn.012a18fc
mov edx, dword [ebp - 0x68]
mov dword [edx + 8], 0x103a6aa
mov edi, eax
lea ecx, [edx + 0xc]
mov eax, 0xfffff000
mov edx, 0xffff
and ecx, 0xfffffffc
and edi, eax
lea esi, [ecx + 0xfff]
and esi, eax
xor eax, eax
mov ebx, dword [0x1427a7c]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x1427a7c], ebx
shr ebx, 0x10
shl eax, 0x10
or eax, ebx
shr edx, 0x10
jne 0x1041945
xor edx, edx
mov ebx, 0xffff
div ebx
inc edx
mov eax, ecx
cmp ecx, esi
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x50], 0
jae 0x1041993
mov ecx, dword [ebp - 0x50]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x1041987
mov eax, 0x103a6aa
jmp 0x1041a6e
mov eax, dword [ebp - 0x48]
mov edx, dword [0x13ca1e8]
sub eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], eax
mov ecx, 0x1000000
sub ecx, edx
mov dword [ebp - 0x1c], ecx
jne 0x10419c0
test eax, eax
je 0x1041a61
mov ecx, dword [0x1236cc0]
mov ebx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x4c]
sub esi, dword [ebp - 0x48]
add eax, ebx
mov dword [ebp - 0x50], eax
xor edi, edi
dec ecx
js 0x1041a03
lea eax, [edi + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x1236cc4]
and edx, 0xfffffff
cmp ebx, edx
jae 0x10419fa
lea ecx, [eax - 1]
jmp 0x10419ff
jbe 0x1041a07
lea edi, [eax + 1]
cmp ecx, edi
jge 0x10419dc
mov ebx, edi
jmp 0x1041a59
mov ebx, eax
jmp 0x1041a59
mov eax, dword [ebx*4 + 0x1236cc4]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x50]
jae 0x1041a61
lea edi, [ecx + esi + 0x1000000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor edx, edx
dec ecx
je 0x1041a4c
dec ecx
je 0x1041a47
dec ecx
jne 0x1041a52
mov edx, dword [ebp - 0x1c]
jmp 0x1041a52
mov edx, dword [ebp - 0x2c]
jmp 0x1041a52
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x2c]
dec eax
dec eax
jne 0x1041a58
add dword [edi], edx
inc ebx
cmp ebx, dword [0x1236cc0]
jb 0x1041a0b
mov eax, dword [0x109dc84]
mov eax, 0x50d789cd
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x68]
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 0x78]
mov esi, dword [ebp - 0x84]
mov edx, dword [ebp - 0x80]
mov edi, dword [ebp - 0x8c]
mov ebx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x88]
mov esp, ebp
pop ebp
popfd
ret