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

Disassembly:
pushfd
push ebp
mov ebp, esp
sub esp, 0x90
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x90], edx
lea eax, [ebp + 4]
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x80], edi
mov edi, dword [eax + 4]
mov esi, dword [0x10fb370]
sub eax, 4
mov dword [ebp - 0x64], eax
mov eax, dword [edi]
shr eax, 4
lea ecx, [esi + eax - 1]
xor edx, edx
mov eax, ecx
div esi
mov eax, dword [0x10fb370]
sub ecx, edx
mov dword [ebp - 0x20], ecx
mov eax, dword [0x1007420]
mov dword [ebp - 0x44], eax
mov eax, dword [0x10fb370]
mov eax, dword [0x1007420]
test eax, eax
je 0x1039617
mov eax, dword [0x1007420]
xor esi, esi
dec eax
lea ecx, [eax + 1]
mov edx, ecx
xor eax, eax
test ecx, ecx
je 0x10395d4
mov ebx, dword [0x138b4cc]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x138b4cc], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x10395ad
xor edx, edx
div ecx
cmp dword [ebp - 0x44], 0
jbe 0x1039611
mov eax, 0xef0b
lea ebx, [edx*4 + 0x1388f9c]
mov ecx, 0xffff10f4
inc esi
lock cmpxchg dword [ebx], ecx
cmp eax, 0xef0b
je 0x1039781
lea eax, [edx + 1]
xor edx, edx
mov ecx, dword [0x1007420]
div ecx
cmp esi, dword [ebp - 0x44]
jb 0x10395de
xor esi, esi
test esi, esi
jne 0x103968d
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
mov ebx, eax
push 0x40
inc esi
push 0x1000
push dword [ebp - 0x20]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x1039795
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x11
jb 0x1039621
xor esi, esi
cmp dword [0x138b2f8], esi
ja 0x103965a
test esi, 3
je 0x103966e
test esi, esi
je 0x103966c
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x1039584
mov eax, esi
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x103968d
mov byte [eax], 0
inc eax
dec ecx
jne 0x1039686
mov eax, 0xa20139f8
mov eax, dword [edi]
mov ecx, eax
mov ebx, 0x1000000
shr eax, 4
mov edx, eax
mov eax, dword [0x10fb370]
shr ecx, 1
and ecx, 7
sub eax, edx
lea ecx, [ecx + edi + 8]
mov dword [ebp - 0x30], ecx
lea edi, [ecx + edx]
mov dword [ebp - 0x44], ecx
lea ecx, [eax + 1]
sub dword [ebp - 0x30], ebx
xor eax, eax
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x38], ecx
test ecx, ecx
je 0x10396f8
mov edx, dword [0x138b4cc]
shr dword [ebp - 0x38], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x138b4cc], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x38], 0
jne 0x10396ce
xor edx, edx
div ecx
add edx, esi
push edx
push dword [ebp - 0x4c]
mov dword [ebp - 0x38], edx
push dword [ebp - 0x30]
mov eax, 0x6a03290e
lea eax, [ebp - 0x78]
mov esi, dword [edi]
mov edi, dword [edi + 4]
push eax
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x74], edi
mov byte [ebp - 0xd], 0
mov eax, 0xde1b7281
mov ecx, dword [0x102c94c]
and dword [ebp - 0x1c], 0
and dword [ebp - 0x18], 0
mov eax, 0xfffffff
and esi, eax
and edi, eax
add esp, 0x10
add esi, ebx
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0x3c], eax
jne 0x103979c
xor ebx, ebx
test edi, edi
jbe 0x1039940
mov ecx, 0x7028c642
mov edx, ecx
movzx eax, byte [ebx + esi]
add eax, ecx
add dword [ebp - 0x1c], eax
add eax, dword [ebp - 0x18]
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
inc ebx
cmp ebx, edi
jb 0x1039759
jmp 0x1039940
mov esi, dword [0x10fb370]
imul esi, edx
lea esi, [esi + section..data]
jmp 0x1039613
mov esi, eax
jmp 0x103964a
lea eax, [edi + esi]
mov edx, dword [0x100003c]
mov dword [ebp - 0x20], eax
mov ecx, esi
mov ebx, 0x1000000
lea edx, [edx + 0x10000a0]
mov eax, dword [edx]
add eax, ebx
sub ecx, ebx
mov ebx, ecx
mov edx, dword [edx + 4]
mov dword [ebp - 0x24], edx
mov edx, ecx
add ecx, edi
mov edi, ecx
and edi, 0xfffff000
sub ecx, edi
and edx, 0xfffff000
mov dword [ebp - 0x5c], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x60], edi
add ecx, eax
mov edi, eax
mov dword [ebp - 0x58], ecx
sub ebx, edx
cmp eax, ecx
je 0x10397f9
cmp dword [edi], edx
jae 0x10397f9
add edi, dword [edi + 4]
cmp edi, dword [ebp - 0x58]
jne 0x10397ed
and dword [ebp - 0x50], 0
cmp edi, dword [ebp - 0x58]
je 0x103982a
cmp dword [edi], edx
jne 0x103982a
mov ecx, dword [edi + 4]
sub ecx, 8
shr ecx, 1
je 0x103982a
lea eax, [edi + 8]
movzx edx, word [eax]
and edx, 0xfff
cmp edx, ebx
jae 0x103982a
inc dword [ebp - 0x50]
inc eax
inc eax
cmp dword [ebp - 0x50], ecx
jne 0x1039813
mov ecx, 0x7028c642
mov eax, dword [ebp - 0x60]
cmp edi, dword [ebp - 0x58]
je 0x1039914
cmp dword [edi], eax
ja 0x1039914
mov edx, dword [edi + 4]
lea ebx, [edx - 8]
shr ebx, 1
cmp dword [ebp - 0x50], ebx
jne 0x1039869
add edi, edx
cmp edi, dword [ebp - 0x58]
je 0x1039914
cmp dword [edi], eax
ja 0x1039914
and dword [ebp - 0x50], 0
jmp 0x1039843
cmp dword [edi], eax
jne 0x1039884
mov edx, dword [ebp - 0x50]
movzx edx, word [edi + edx*2 + 8]
and edx, 0xfff
cmp edx, dword [ebp - 0x5c]
jae 0x1039914
mov ebx, 0xf000
mov edx, dword [ebp - 0x50]
inc dword [ebp - 0x50]
test word [edi + edx*2 + 8], bx
je 0x1039832
movzx eax, word [edi + edx*2 + 8]
mov edx, dword [edi]
and eax, 0xfff
lea eax, [eax + edx + 0x1000000]
mov dword [ebp - 0x28], eax
xor ebx, ebx
sub dword [ebp - 0x28], esi
mov dword [ebp - 0x24], eax
je 0x10398da
movzx eax, byte [ebx + esi]
add eax, ecx
mov edx, ecx
add dword [ebp - 0x1c], eax
add eax, dword [ebp - 0x18]
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
inc ebx
cmp ebx, dword [ebp - 0x28]
jb 0x10398b6
mov esi, dword [ebp - 0x24]
mov eax, dword [esi]
sub eax, dword [ebp - 0x3c]
xor ebx, ebx
mov dword [ebp - 0x68], eax
mov edx, ecx
movzx eax, byte [ebp + ebx - 0x68]
add eax, ecx
add dword [ebp - 0x1c], eax
add eax, dword [ebp - 0x18]
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x1c], eax
inc ebx
mov dword [ebp - 0x18], eax
cmp ebx, 4
jb 0x10398e7
add esi, 4
jmp 0x103982f
mov ebx, dword [ebp - 0x20]
xor edi, edi
sub ebx, esi
je 0x1039940
movzx eax, byte [edi + esi]
add eax, ecx
mov edx, ecx
add dword [ebp - 0x1c], eax
add eax, dword [ebp - 0x18]
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
inc edi
cmp edi, ebx
jb 0x103991d
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x1c]
mov byte [ebp + eax - 0xc], cl
inc eax
cmp eax, 8
jb 0x1039942
mov eax, 0x9c5b149b
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x4c]
and eax, 7
mov dword [ebp - 0x20], eax
je 0x1039b17
mov edx, dword [ebp - 0x30]
not edx
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x14], ecx
jle 0x10399af
push 0x38
pop edi
movzx ebx, byte [esi]
cmp dword [ebp - 0x14], 4
jge 0x103999c
lea ecx, [edi - 0x20]
shl ebx, cl
or dword [ebp - 0x40], ebx
jmp 0x10399a3
mov ecx, edi
shl ebx, cl
or dword [ebp - 0x28], ebx
inc esi
inc dword [ebp - 0x14]
sub edi, 8
cmp dword [ebp - 0x14], eax
jl 0x1039989
movzx edi, word [ebp - 0xa]
movzx ecx, word [ebp - 6]
movzx ebx, word [ebp - 8]
mov eax, dword [ebp - 0x30]
sub eax, edi
rol eax, 3
imul ecx, eax
mov eax, dword [ebp - 0x30]
shr eax, 0xd
xor ecx, eax
xor edx, ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x2c], ebx
xor ecx, edx
rol ecx, 0xa
imul ebx, ecx
mov eax, edx
rol eax, 3
xor eax, ebx
xor eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], edi
mov ecx, eax
ror ecx, 5
sub ecx, edi
imul ecx, dword [ebp - 0x2c]
xor edx, ecx
movzx ecx, word [ebp - 0xc]
mov ebx, edx
ror ebx, 2
xor ebx, ecx
imul ebx, edi
mov edi, dword [ebp - 8]
xor edi, dword [ebp - 0xc]
xor eax, ebx
mov ebx, dword [ebp - 0x2c]
xor edi, edx
xor edi, eax
mov dword [ebp - 0x24], ecx
mov edx, edi
xor ecx, edi
rol ecx, 7
imul ebx, ecx
rol edx, 0xe
xor edx, ebx
xor eax, edx
mov ebx, dword [ebp - 0x14]
mov ecx, eax
sub ecx, dword [ebp - 8]
mov edx, eax
ror ecx, 2
imul ebx, ecx
rol edx, 5
mov ecx, dword [ebp - 0x24]
xor edx, ebx
xor edi, edx
mov ebx, edi
mov edx, dword [ebp - 0x14]
xor edx, edi
rol edx, 7
imul ecx, edx
ror ebx, 0xd
sub ecx, ebx
movzx edx, word [ebp - 6]
xor eax, ecx
mov ecx, dword [ebp - 0x2c]
mov ebx, ecx
xor ebx, eax
imul ebx, edx
mov edx, eax
shr edx, 1
xor ebx, edx
xor edi, ebx
mov ebx, edi
mov edx, dword [ebp - 0xc]
xor edx, edi
rol edx, 0xb
imul ecx, edx
mov edx, dword [ebp - 0x14]
ror ebx, 7
sub ecx, ebx
xor eax, ecx
mov ebx, eax
mov ecx, dword [ebp - 8]
add ecx, eax
and dword [ebp - 0x14], 0
ror ecx, 6
imul edx, ecx
ror ebx, 0xa
sub edx, ebx
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
xor edi, edx
xor ecx, edi
xor edi, dword [ebp - 0x28]
mov edx, dword [ebp - 8]
sub edx, ecx
xor edx, dword [ebp - 0x40]
xor eax, edx
mov ecx, edi
mov dword [ebp - 0x2c], eax
test ebx, ebx
jle 0x1039aed
cmp dword [ebp - 0x14], 4
jge 0x1039ad4
rol dword [ebp - 0x2c], 8
mov dl, byte [ebp - 0x2c]
mov ebx, dword [ebp - 0x34]
inc dword [ebp - 0x34]
xor byte [ebp - 0xd], dl
mov byte [ebx], dl
jmp 0x1039ae2
mov edx, dword [ebp - 0x34]
inc dword [ebp - 0x34]
rol ecx, 8
xor byte [ebp - 0xd], cl
mov byte [edx], cl
inc dword [ebp - 0x14]
mov ebx, dword [ebp - 0x20]
cmp dword [ebp - 0x14], ebx
jl 0x1039aba
add ebx, 0xfffffffc
test ebx, ebx
jle 0x1039b04
push 4
pop ecx
sub ecx, ebx
shl ecx, 3
shr edi, cl
shl edi, cl
mov edx, edi
jmp 0x1039b26
xor edx, edx
test ebx, ebx
jge 0x1039b26
neg ebx
shl ebx, 3
mov ecx, ebx
shr eax, cl
shl eax, cl
jmp 0x1039b26
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], eax
not eax
mov dword [ebp - 0x28], eax
xor edx, edx
xor eax, eax
mov edi, dword [ebp - 0x4c]
shr edi, 3
test edi, edi
jbe 0x1039cf2
movzx ecx, word [ebp - 0xa]
mov dword [ebp - 0x20], ecx
neg dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 8]
xor ecx, dword [ebp - 0xc]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x70], ecx
movzx ecx, word [ebp - 6]
mov dword [ebp - 0x3c], ecx
movzx edi, byte [esi + 1]
movzx ecx, byte [esi]
shl ecx, 8
or ecx, edi
shl ecx, 8
movzx edi, byte [esi + 2]
movzx ebx, byte [esi + 5]
or ecx, edi
shl ecx, 8
movzx edi, byte [esi + 3]
or ecx, edi
movzx edi, byte [esi + 4]
shl edi, 8
or edi, ebx
shl edi, 8
movzx ebx, byte [esi + 6]
or edi, ebx
movzx ebx, byte [esi + 7]
xor eax, ecx
shl edi, 8
or edi, ebx
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x20]
add ecx, eax
add esi, 8
mov dword [ebp - 0x6c], edi
rol ecx, 3
imul ebx, ecx
mov ecx, eax
shr ecx, 0xd
xor ebx, ecx
mov ecx, dword [ebp - 0xc]
xor ebx, edi
xor edx, ebx
mov ebx, edx
movzx edi, word [ebp - 8]
xor ecx, edx
rol ecx, 0xa
imul edi, ecx
movzx ecx, word [ebp - 8]
rol ebx, 3
xor ebx, edi
xor eax, ebx
mov edi, eax
ror edi, 5
sub edi, dword [ebp - 0x14]
imul edi, ecx
movzx ecx, word [ebp - 0xc]
xor edx, edi
mov edi, edx
ror edi, 2
xor edi, ecx
imul edi, dword [ebp - 0x14]
xor eax, edi
mov edi, dword [ebp - 0x70]
xor edi, edx
xor edi, eax
mov edx, edi
movzx edi, word [ebp - 8]
xor ecx, edx
mov ebx, edx
rol ecx, 7
imul edi, ecx
rol ebx, 0xe
xor ebx, edi
xor eax, ebx
mov edi, eax
mov ecx, eax
sub ecx, dword [ebp - 8]
ror ecx, 2
mov ebx, dword [ebp - 0x14]
imul ebx, ecx
mov ecx, dword [ebp - 0x14]
rol edi, 5
xor edi, ebx
xor edx, edi
mov ebx, edx
xor ecx, edx
rol ecx, 7
movzx edi, word [ebp - 0xc]
ror ebx, 0xd
imul edi, ecx
sub edi, ebx
xor eax, edi
mov ebx, eax
movzx edi, word [ebp - 8]
mov ecx, edi
xor ecx, eax
imul ecx, dword [ebp - 0x3c]
shr ebx, 1
xor ecx, ebx
xor edx, ecx
mov ecx, dword [ebp - 0xc]
mov ebx, edx
xor ecx, edx
rol ecx, 0xb
imul edi, ecx
ror ebx, 7
mov ecx, dword [ebp - 8]
sub edi, ebx
mov ebx, dword [ebp - 0x14]
xor eax, edi
mov edi, eax
add ecx, eax
ror ecx, 6
imul ebx, ecx
mov ecx, dword [ebp - 0xc]
ror edi, 0xa
sub ebx, edi
mov edi, dword [ebp - 8]
xor edx, ebx
xor ecx, edx
xor edx, dword [ebp - 0x28]
sub edi, ecx
xor edi, dword [ebp - 0x40]
xor eax, edi
mov edi, dword [ebp - 0x34]
mov cl, byte [ebp - 0xd]
xor cl, al
mov byte [edi + 3], al
xor cl, dl
mov byte [edi + 7], dl
ror eax, 8
mov byte [edi + 2], al
xor cl, al
ror edx, 8
mov byte [edi + 6], dl
xor cl, dl
ror eax, 8
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 - 0x2c]
mov byte [edi], al
mov byte [edi + 4], dl
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x6c]
add edi, 8
dec dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
ror eax, 8
mov dword [ebp - 0x34], edi
ror edx, 8
jne 0x1039b54
mov eax, dword [ebp - 0x48]
mov al, byte [eax + 8]
xor al, byte [ebp - 0xd]
je 0x1039d88
call fcn.010bfbea
mov edi, eax
mov eax, dword [ebp - 0x64]
lea ecx, [eax + 0xc]
mov edx, 0xfffff000
and ecx, 0xfffffffc
and edi, edx
mov dword [eax + 8], 0x12e07d9
lea esi, [ecx + 0xfff]
and esi, edx
mov edx, 0xffff
xor eax, eax
mov ebx, dword [0x138b4cc]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x138b4cc], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x1039d2e
mov ebx, 0xffff
div ebx
inc edx
mov dword [ebp - 0x90], edi
mov dword [ebp - 0x88], edx
mov dword [ebp - 0x48], 0
jmp 0x1039d7a
mov eax, dword [ebp - 0x48]
mov dword [ecx], eax
add ecx, 4
cmp ecx, esi
jb 0x1039d72
mov eax, 0x12e07d9
jmp 0x1039e59
mov eax, dword [ebp - 0x44]
mov ecx, 0x1000000
mov edx, dword [0x102c94c]
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
sub ecx, edx
mov dword [ebp - 0x24], ecx
jne 0x1039dab
test eax, eax
je 0x1039e4c
mov ecx, dword [0x1069ab8]
mov esi, dword [ebp - 0x38]
sub esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x30]
add eax, ebx
mov dword [ebp - 0x48], eax
xor edi, edi
dec ecx
js 0x1039dee
lea eax, [edi + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x1069abc]
and edx, 0xfffffff
cmp ebx, edx
jae 0x1039de5
lea ecx, [eax - 1]
jmp 0x1039dea
jbe 0x1039df2
lea edi, [eax + 1]
cmp ecx, edi
jge 0x1039dc7
mov ebx, edi
jmp 0x1039e44
mov ebx, eax
jmp 0x1039e44
mov eax, dword [ebx*4 + 0x1069abc]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x48]
jae 0x1039e4c
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 0x1039e37
dec ecx
je 0x1039e32
dec ecx
jne 0x1039e3d
mov edx, dword [ebp - 0x24]
jmp 0x1039e3d
mov edx, dword [ebp - 0x3c]
jmp 0x1039e3d
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x3c]
dec eax
dec eax
jne 0x1039e43
add dword [edi], edx
inc ebx
cmp ebx, dword [0x1069ab8]
jb 0x1039df6
mov eax, dword [0x10fb370]
mov eax, 0x83806ab3
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x64]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x90]
mov esi, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x88]
mov eax, dword [ebp - 0x8c]
mov edi, dword [ebp - 0x80]
mov ebx, dword [ebp - 0x7c]
mov esp, ebp
pop ebp
popfd
ret