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

Disassembly:
pushfd
push ebp
mov ebp, esp
sub esp, 0x74
mov dword [ebp - 0x74], eax
lea eax, [ebp + 4]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x6c], edi
mov edi, dword [0x1005bf8]
mov esi, dword [eax + 4]
sub eax, 4
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
and eax, 0xfffffff
xor edx, edx
lea ecx, [edi + eax - 1]
mov eax, ecx
div edi
mov eax, dword [0x1005bf8]
sub ecx, edx
mov dword [ebp - 0x14], ecx
mov eax, dword [0x1040344]
mov dword [ebp - 0x18], eax
mov eax, dword [0x1005bf8]
mov eax, dword [0x1040344]
test eax, eax
je 0x1001578
mov eax, dword [0x1040344]
xor edi, edi
dec eax
lea ecx, [eax + 1]
mov edx, ecx
xor eax, eax
test ecx, ecx
je 0x100152d
mov ebx, dword [0x104c148]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x104c148], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x1001506
xor edx, edx
div ecx
cmp dword [ebp - 0x18], 0
jbe 0x100156a
mov ecx, 0xffff2e5b
inc edi
mov eax, 0xd1a4
lea ebx, [edx*4 + 0x104d53c]
lock cmpxchg dword [ebx], ecx
cmp eax, 0xd1a4
je 0x1001711
mov ecx, dword [0x1040344]
lea eax, [edx + 1]
xor edx, edx
div ecx
cmp edi, dword [ebp - 0x18]
jb 0x1001537
and dword [ebp - 8], 0
cmp dword [ebp - 8], 0
jne 0x10015fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov ebx, eax
inc edi
push 0x40
push 0x1000
push dword [ebp - 0x14]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x1001727
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 0x11
jb 0x1001582
and dword [ebp - 8], 0
cmp dword [ebp - 8], 0x10000
jb 0x10015bf
test dword [ebp - 8], 3
je 0x10015d9
cmp dword [ebp - 8], 0
je 0x10015d5
push 0x8000
push 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
and dword [ebp - 8], 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
je 0x10014d9
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
test ecx, ecx
je 0x10015fb
mov byte [eax], 0
inc eax
dec ecx
jne 0x10015f4
mov eax, 0xf118322b
mov eax, dword [esi]
and eax, 7
lea ebx, [eax + esi + 8]
mov esi, dword [esi + 4]
mov eax, dword [0x1005bf8]
mov dword [ebp - 0xc], ebx
and esi, 0xfffffff
sub eax, esi
sub dword [ebp - 0xc], 0x1000000
mov dword [ebp - 0x18], ebx
lea edi, [esi + ebx]
lea ecx, [eax + 1]
xor eax, eax
test ecx, ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x14], ecx
je 0x1001665
mov edx, dword [0x104c148]
shr dword [ebp - 0x14], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x104c148], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x14], 0
jne 0x100163b
xor edx, edx
div ecx
mov eax, dword [ebp - 8]
push esi
add eax, edx
push dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, 0x79497b43
mov eax, dword [edi]
mov dword [ebp - 0x48], eax
test esi, esi
mov eax, dword [edi + 4]
pop ecx
pop ecx
mov dword [ebp - 0x44], eax
mov byte [ebp - 1], 0
jbe 0x1001b5a
lea esi, [ebp - 0x48]
mov eax, 0x41adebfe
mov esi, dword [ebp - 0x44]
mov eax, 0xfffffff
mov ecx, dword [0x1033b04]
mov edx, dword [ebp - 0x48]
and edx, eax
and esi, eax
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov eax, 0x1000000
mov dword [ebp - 0x3c], ebx
add edx, eax
sub eax, ecx
mov dword [ebp - 0x24], eax
jne 0x100172f
cmp esi, ebx
jbe 0x1001924
mov edi, 0x6a74adea
movzx eax, byte [ebx + edx]
add eax, edi
add dword [ebp - 0x40], eax
add eax, dword [ebp - 0x3c]
imul eax, eax, 0x6a74adea
ror eax, 0x19
mov ecx, eax
imul eax, eax, 0x139
rol eax, 0xa
ror ecx, 0xa
xor eax, ecx
imul eax, eax, 0x6a74adea
ror eax, 0x19
add dword [ebp - 0x40], eax
inc ebx
mov dword [ebp - 0x3c], eax
cmp ebx, esi
jb 0x10016d3
jmp 0x1001924
mov eax, dword [0x1005bf8]
imul eax, edx
lea eax, [eax + 0x1043008]
mov dword [ebp - 8], eax
jmp 0x100156e
mov dword [ebp - 8], eax
jmp 0x10015ad
mov ebx, 0x1000000
lea eax, [edx + esi]
mov edi, dword [0x100003c]
lea edi, [edi + 0x10000a0]
mov ecx, edx
mov dword [ebp - 0x2c], eax
mov eax, dword [edi]
add eax, ebx
sub ecx, ebx
mov ebx, dword [edi + 4]
mov edi, ecx
and edi, 0xfffff000
mov dword [ebp - 0x14], edi
mov edi, ecx
sub edi, dword [ebp - 0x14]
add ecx, esi
mov esi, ecx
and esi, 0xfffff000
sub ecx, esi
add ebx, eax
cmp eax, ebx
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], ecx
mov esi, eax
mov dword [ebp - 0x54], ebx
je 0x100178d
mov eax, dword [ebp - 0x14]
cmp dword [esi], eax
jae 0x100178d
add esi, dword [esi + 4]
cmp esi, dword [ebp - 0x54]
jne 0x100177e
mov ecx, 0xfff
and dword [ebp - 0x4c], 0
cmp esi, dword [ebp - 0x54]
je 0x10017ca
mov eax, dword [ebp - 0x14]
cmp dword [esi], eax
jne 0x10017ca
mov eax, dword [esi + 4]
sub eax, 8
shr eax, 1
je 0x10017ca
lea ebx, [esi + 8]
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x14]
movzx ebx, word [ebx]
and ebx, ecx
cmp ebx, edi
jae 0x10017ca
inc dword [ebp - 0x4c]
add dword [ebp - 0x14], 2
cmp dword [ebp - 0x4c], eax
jne 0x10017b2
mov edi, 0x6a74adea
cmp esi, dword [ebp - 0x54]
je 0x10018e2
mov eax, dword [esi]
cmp eax, dword [ebp - 0x5c]
ja 0x10018e2
mov ebx, dword [ebp - 0x4c]
mov eax, dword [esi + 4]
add eax, 0xfffffff8
shr eax, 1
cmp ebx, eax
jne 0x100180d
add esi, dword [esi + 4]
cmp esi, dword [ebp - 0x54]
je 0x10018e2
mov eax, dword [ebp - 0x5c]
cmp dword [esi], eax
ja 0x10018e2
xor ebx, ebx
jmp 0x10017e6
mov eax, dword [ebp - 0x5c]
cmp dword [esi], eax
jne 0x1001824
movzx eax, word [esi + ebx*2 + 8]
and eax, ecx
cmp eax, dword [ebp - 0x58]
jae 0x10018e2
mov eax, ebx
inc ebx
mov dword [ebp - 0x4c], ebx
mov ebx, 0xf000
test word [esi + eax*2 + 8], bx
je 0x10017cf
movzx eax, word [esi + eax*2 + 8]
and eax, ecx
mov ecx, dword [esi]
lea eax, [eax + ecx + 0x1000000]
mov dword [ebp - 0x14], eax
xor ecx, ecx
sub dword [ebp - 0x14], edx
mov dword [ebp - 8], eax
je 0x100188d
movzx eax, byte [ecx + edx]
add eax, edi
add dword [ebp - 0x40], eax
add eax, dword [ebp - 0x3c]
imul eax, eax, 0x6a74adea
ror eax, 0x19
mov ebx, eax
imul eax, eax, 0x139
rol eax, 0xa
ror ebx, 0xa
xor eax, ebx
imul eax, eax, 0x6a74adea
ror eax, 0x19
add dword [ebp - 0x40], eax
inc ecx
mov dword [ebp - 0x3c], eax
cmp ecx, dword [ebp - 0x14]
jb 0x1001853
mov ebx, dword [ebp - 8]
mov eax, dword [ebx]
sub eax, dword [ebp - 0x24]
xor ecx, ecx
mov dword [ebp - 0x28], eax
movzx eax, byte [ebp + ecx - 0x28]
add eax, edi
add dword [ebp - 0x40], eax
add eax, dword [ebp - 0x3c]
imul eax, eax, 0x6a74adea
ror eax, 0x19
mov edx, eax
imul eax, eax, 0x139
rol eax, 0xa
ror edx, 0xa
xor eax, edx
imul eax, eax, 0x6a74adea
ror eax, 0x19
add dword [ebp - 0x40], eax
inc ecx
cmp ecx, 4
mov dword [ebp - 0x3c], eax
jb 0x100189a
mov ecx, 0xfff
lea edx, [ebx + 4]
jmp 0x10017cf
mov ebx, dword [ebp - 0x2c]
xor esi, esi
sub ebx, edx
je 0x1001924
movzx eax, byte [esi + edx]
add eax, edi
add dword [ebp - 0x40], eax
add eax, dword [ebp - 0x3c]
imul eax, eax, 0x6a74adea
ror eax, 0x19
mov ecx, eax
imul eax, eax, 0x139
rol eax, 0xa
ror ecx, 0xa
xor eax, ecx
imul eax, eax, 0x6a74adea
ror eax, 0x19
add dword [ebp - 0x40], eax
inc esi
mov dword [ebp - 0x3c], eax
cmp esi, ebx
jb 0x10018eb
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x40]
mov byte [ebp + eax - 0x38], cl
inc eax
cmp eax, 6
jb 0x1001926
mov eax, 0xbeedc358
mov esi, 0x100
mov eax, dword [ebp - 0x1c]
or byte [ebp - 0x38], 1
or byte [ebp - 0x36], 1
or byte [ebp - 0x34], 1
or byte [ebp - 0x33], 1
dec eax
mov dword [ebp - 0x14], eax
je 0x1001ace
mov ecx, dword [ebp - 0x18]
add eax, ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
sub eax, ecx
mov dword [ebp - 0x2c], eax
test byte [ebp - 0x14], 1
je 0x1001a19
movzx edi, byte [ebp - 0x35]
mov edx, dword [ebp - 8]
mov al, byte [edx]
mov cl, al
movzx eax, al
xor cl, byte [ebp - 0x35]
and cl, 1
mov byte [ebp - 2], cl
je 0x10019a9
mov ebx, edi
shr ebx, 1
movzx ecx, byte [ebp - 0x36]
shr ecx, 1
xor ecx, ebx
mov ebx, eax
xor ebx, esi
sar ebx, 1
xor ecx, ebx
jmp 0x10019af
mov ecx, eax
xor ecx, edi
shr ecx, 1
movzx edx, byte [edx - 1]
mov ebx, edx
xor ebx, ecx
test bl, 1
je 0x10019f0
cmp byte [ebp - 2], 0
je 0x10019d4
movzx ecx, byte [ebp - 0x36]
shr ecx, 1
shr edi, 1
xor eax, esi
xor ecx, edi
sar eax, 1
xor ecx, eax
jmp 0x10019da
xor eax, edi
shr eax, 1
mov ecx, eax
movzx eax, byte [ebp - 0x33]
shr eax, 1
xor edx, ecx
xor eax, 0x80
sar edx, 1
xor eax, edx
jmp 0x1001ab2
cmp byte [ebp - 2], 0
je 0x1001a08
movzx ecx, byte [ebp - 0x36]
shr ecx, 1
shr edi, 1
xor eax, esi
xor ecx, edi
sar eax, 1
xor ecx, eax
jmp 0x1001a0e
xor eax, edi
shr eax, 1
mov ecx, eax
xor edx, ecx
sar edx, 1
mov eax, edx
jmp 0x1001ab2
mov eax, dword [ebp - 8]
mov cl, byte [eax]
mov al, cl
xor al, byte [ebp - 0x37]
and al, 1
mov byte [ebp - 2], al
movzx eax, byte [ebp - 0x37]
movzx ecx, cl
je 0x1001a47
mov edx, eax
movzx edi, byte [ebp - 0x38]
shr edx, 1
shr edi, 1
xor edi, edx
mov edx, ecx
xor edx, esi
sar edx, 1
xor edi, edx
jmp 0x1001a4d
mov edi, eax
xor edi, ecx
shr edi, 1
mov edx, dword [ebp - 8]
movzx ebx, byte [edx - 1]
mov edx, ebx
xor edx, edi
test dl, 1
je 0x1001a8e
cmp byte [ebp - 2], 0
je 0x1001a75
movzx edx, byte [ebp - 0x38]
shr edx, 1
shr eax, 1
xor ecx, esi
xor edx, eax
sar ecx, 1
xor edx, ecx
jmp 0x1001a7b
xor eax, ecx
shr eax, 1
mov edx, eax
movzx eax, byte [ebp - 0x34]
shr eax, 1
xor ebx, edx
xor eax, 0x80
sar ebx, 1
xor eax, ebx
jmp 0x1001ab2
cmp byte [ebp - 2], 0
je 0x1001aa6
movzx edx, byte [ebp - 0x38]
shr edx, 1
shr eax, 1
xor ecx, esi
xor edx, eax
sar ecx, 1
xor edx, ecx
jmp 0x1001aac
xor eax, ecx
shr eax, 1
mov edx, eax
xor ebx, edx
sar ebx, 1
mov eax, ebx
xor byte [ebp - 1], al
mov edx, dword [ebp - 8]
dec dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
dec dword [ebp - 8]
cmp dword [ebp - 0x14], 0
mov byte [ecx + edx], al
ja 0x1001970
mov eax, dword [ebp - 0x18]
mov cl, byte [eax]
movzx eax, byte [ebp - 0x37]
mov bl, cl
movzx ecx, cl
xor bl, byte [ebp - 0x37]
and bl, 1
je 0x1001afa
movzx edx, byte [ebp - 0x38]
mov edi, eax
shr edi, 1
shr edx, 1
xor edx, edi
mov edi, ecx
xor edi, esi
sar edi, 1
xor edx, edi
jmp 0x1001b00
mov edx, eax
xor edx, ecx
shr edx, 1
test dl, 1
je 0x1001b2b
test bl, bl
je 0x1001b1b
movzx edi, byte [ebp - 0x38]
shr edi, 1
shr eax, 1
xor ecx, esi
xor edi, eax
sar ecx, 1
xor edi, ecx
jmp 0x1001b21
xor eax, ecx
shr eax, 1
mov edi, eax
movzx edx, byte [ebp - 0x34]
xor edx, edi
xor edx, esi
jmp 0x1001b47
test bl, bl
je 0x1001b41
movzx edx, byte [ebp - 0x38]
shr edx, 1
shr eax, 1
xor ecx, esi
xor edx, eax
sar ecx, 1
xor edx, ecx
jmp 0x1001b47
xor eax, ecx
shr eax, 1
mov edx, eax
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
sar edx, 1
mov ebx, dword [ebp - 0x18]
xor byte [ebp - 1], dl
mov byte [eax], dl
mov al, byte [edi + 8]
xor al, byte [ebp - 1]
je 0x1001beb
call fcn.0100ddeb
mov edi, eax
mov edx, 0xfffff000
mov eax, dword [ebp - 0x20]
mov dword [eax + 8], 0x1040348
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
and edi, edx
lea esi, [ecx + 0xfff]
and esi, edx
xor eax, eax
mov edx, 0xffff
mov ebx, dword [0x104c148]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x104c148], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x1001b93
mov ebx, 0xffff
div ebx
inc edx
mov dword [ebp - 0x70], edi
cmp ecx, esi
mov eax, ecx
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x30], 0
jae 0x1001be1
mov ecx, dword [ebp - 0x30]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x1001bd5
mov eax, 0x1040348
jmp 0x1001cb8
mov ecx, 0x1000000
mov edx, dword [0x1033b04]
mov eax, ebx
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
sub ecx, edx
mov dword [ebp - 0x1c], ecx
jne 0x1001c0d
test eax, eax
je 0x1001cab
mov edi, dword [ebp - 0x10]
sub edi, ebx
mov ecx, dword [0x101a560]
mov eax, dword [ebp - 0xc]
add eax, esi
xor ebx, ebx
dec ecx
mov dword [ebp - 0x30], eax
js 0x1001c4d
lea eax, [ecx + ebx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x101a564]
and edx, 0xfffffff
cmp dword [ebp - 0xc], edx
jae 0x1001c44
lea ecx, [eax - 1]
jmp 0x1001c49
jbe 0x1001c51
lea ebx, [eax + 1]
cmp ecx, ebx
jge 0x1001c25
mov esi, ebx
jmp 0x1001ca3
mov esi, eax
jmp 0x1001ca3
mov eax, dword [esi*4 + 0x101a564]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x30]
jae 0x1001cab
lea edx, [ecx + edi + 0x1000000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor ebx, ebx
dec ecx
je 0x1001c96
dec ecx
je 0x1001c91
dec ecx
jne 0x1001c9c
mov ebx, dword [ebp - 0x1c]
jmp 0x1001c9c
mov ebx, dword [ebp - 0x18]
jmp 0x1001c9c
mov ebx, dword [ebp - 0x1c]
sub ebx, dword [ebp - 0x18]
dec eax
dec eax
jne 0x1001ca2
add dword [edx], ebx
inc esi
cmp esi, dword [0x101a560]
jb 0x1001c55
mov eax, dword [0x1005bf8]
mov eax, 0x2e55bcd8
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 8], eax
mov edi, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x74]
mov ebx, dword [ebp - 0x68]
mov esi, dword [ebp - 0x64]
mov esp, ebp
pop ebp
popfd
ret