Function at 0x10001025
Capabilities:
Contain obfuscated stackstrings
Enumerate pe sections
Get system information on windows
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
cmp dword [ebp + 0xc], 1
push esi
jne 0x100017ad
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x3c], 0x905a4d
mov dword [ebp - 0x38], 3
mov dword [ebp - 0x34], 4
mov dword [ebp - 0x30], 0xffff
mov dword [ebp - 0x2c], 0xb8
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x24], 0x40
mov dword [ebp - 0x20], 0x74732f2e
mov dword [ebp - 0x1c], 0x642e6275
mov word [ebp - 0x18], 0x7461
mov byte [ebp - 0x16], 0
mov word [ebp + 0xc], 0x6272
mov byte [ebp + 0xe], 0
call fcn.1000246c
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x100017ad
push ebx
push edi
push 2
xor edi, edi
push edi
push esi
call fcn.10002334
push esi
call fcn.10002245
push edi
push edi
push esi
mov dword [ebp + 8], eax
call fcn.10002334
push dword [ebp + 8]
call fcn.10002031
push esi
push dword [ebp + 8]
mov ebx, eax
push 1
push ebx
mov dword [ebp - 8], ebx
call fcn.10001fc5
push esi
call fcn.10001d07
and dword [ebp - 4], 0
add esp, 0x34
cmp dword [ebp + 8], 0x40
push 6
pop ecx
lea esi, [ebp - 0x3c]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jb 0x10001119
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x10001194
mov edi, dword [ebx + 0x3c]
lea eax, [edi + 0xf8]
cmp dword [ebp + 8], eax
jae 0x10001120
push 0xd
jmp 0x100011f3
add edi, ebx
cmp dword [edi], 0x4550
jne 0x10001194
mov eax, 0x14c
cmp word [edi + 4], ax
jne 0x10001194
mov ebx, dword [edi + 0x38]
test bl, 1
jne 0x10001194
movzx eax, word [edi + 0x14]
lea ecx, [eax + edi + 0x24]
movzx eax, word [edi + 6]
test eax, eax
je 0x1000116c
mov esi, eax
mov edx, dword [ecx + 4]
mov eax, dword [ecx]
test edx, edx
jne 0x1000115c
add eax, ebx
jmp 0x1000115e
add eax, edx
cmp eax, dword [ebp - 4]
jbe 0x10001166
mov dword [ebp - 4], eax
add ecx, 0x28
dec esi
jne 0x1000114f
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x5c]
mov edx, dword [edi + 0x50]
lea esi, [edx + eax - 1]
mov edx, dword [ebp - 4]
lea ecx, [eax - 1]
not ecx
lea eax, [eax + edx - 1]
and esi, ecx
and eax, ecx
cmp esi, eax
je 0x1000119b
push 0xc1
jmp 0x100011f3
push 4
push 0x3000
push esi
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x100011cd
push 4
push 0x3000
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x100011f1
push 0x34
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 0x100011fe
push 0x8000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100017ab
mov dword [esi + 4], ebx
movzx eax, word [edi + 0x16]
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 - 0x5c]
mov dword [esi + 0x30], eax
mov eax, dword [edi + 0x54]
cmp dword [ebp + 8], eax
jae 0x1000123c
push 0xd
jmp 0x1000172b
push 4
push 0x1000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [edi + 0x54]
mov dword [ebp - 0x14], eax
push dword [ebp - 8]
push eax
call fcn.100018b0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 0x14]
and dword [ebp - 0xc], 0
mov dword [esi], eax
mov dword [eax + 0x34], ebx
mov eax, dword [esi + 4]
mov dword [ebp - 4], 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 0x10001332
lea ebx, [ecx + 0x10]
mov eax, dword [ebx]
test eax, eax
jne 0x100012d1
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x14], eax
test eax, eax
jle 0x1000131d
push 4
push 0x1000
push eax
mov eax, dword [ebx - 4]
add eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x10001731
mov eax, dword [ebx - 4]
push dword [ebp - 0x14]
add eax, dword [ebp - 4]
push 0
push eax
mov dword [ebx - 8], eax
call fcn.10001c20
jmp 0x1000131a
mov ecx, dword [ebx + 4]
add ecx, eax
cmp dword [ebp + 8], ecx
jb 0x10001235
push 4
push 0x1000
push eax
mov eax, dword [ebx - 4]
add eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x10001731
mov ecx, dword [ebx + 4]
push dword [ebx]
mov eax, dword [ebx - 4]
add ecx, dword [ebp - 8]
add eax, dword [ebp - 4]
push ecx
push eax
mov dword [ebp - 0x14], eax
call fcn.100018b0
mov eax, dword [ebp - 0x14]
mov dword [ebx - 8], eax
add esp, 0xc
mov eax, dword [esi]
movzx eax, word [eax + 6]
inc dword [ebp - 0xc]
add ebx, 0x28
cmp dword [ebp - 0xc], eax
jl 0x1000128e
mov eax, dword [esi]
mov ecx, dword [eax + 0x34]
sub ecx, dword [edi + 0x34]
mov dword [ebp - 0xc], ecx
je 0x100013b8
cmp dword [eax + 0xa4], 0
mov edi, dword [esi + 4]
jne 0x1000134f
xor eax, eax
jmp 0x100013b3
mov eax, dword [eax + 0xa0]
add eax, edi
jmp 0x100013aa
and dword [ebp + 8], 0
add ecx, edi
mov dword [ebp - 0x14], ecx
mov ecx, dword [eax + 4]
sub ecx, 8
lea edx, [eax + 8]
test ecx, 0xfffffffe
jbe 0x100013a7
movzx ecx, word [edx]
mov ebx, ecx
and ebx, 0xfffff000
cmp ebx, 0x3000
jne 0x10001394
mov ebx, dword [ebp - 0xc]
and ecx, 0xfff
add ecx, dword [ebp - 0x14]
add dword [ecx], ebx
mov ecx, dword [eax + 4]
inc dword [ebp + 8]
sub ecx, 8
shr ecx, 1
add edx, 2
cmp dword [ebp + 8], ecx
jb 0x10001373
add eax, dword [eax + 4]
mov ecx, dword [eax]
test ecx, ecx
jne 0x10001359
xor eax, eax
inc eax
mov dword [esi + 0x18], eax
jmp 0x100013bf
mov dword [esi + 0x18], 1
mov eax, dword [esi]
cmp dword [eax + 0x84], 0
mov ebx, dword [esi + 4]
mov dword [ebp - 8], 1
je 0x10001502
mov edi, dword [eax + 0x80]
push 0x14
add edi, ebx
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10001502
add edi, 0x10
mov dword [ebp + 8], edi
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
test eax, eax
je 0x100014f8
push dword [esi + 0x28]
add eax, ebx
push eax
call dword [esi + 0x1c]
mov edi, eax
pop ecx
pop ecx
mov dword [ebp - 0xc], edi
test edi, edi
je 0x100014ce
mov eax, dword [esi + 0xc]
lea eax, [eax*4 + 4]
push eax
push dword [esi + 8]
call fcn.100017f9
pop ecx
pop ecx
test eax, eax
je 0x100014d5
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 eax, dword [eax - 0x10]
test eax, eax
je 0x1000145c
lea edi, [eax + ebx]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, ebx
jmp 0x10001465
mov eax, dword [ebp + 8]
mov edi, dword [eax]
add edi, ebx
mov ecx, edi
mov eax, dword [edi]
test eax, eax
je 0x100014ab
mov dword [ebp - 4], ecx
sub dword [ebp - 4], edi
push dword [esi + 0x28]
test eax, eax
jns 0x1000147f
and eax, 0xffff
jmp 0x10001484
add eax, ebx
add eax, 2
push eax
push dword [ebp - 0xc]
call dword [esi + 0x20]
mov ecx, dword [ebp - 4]
mov dword [ecx + edi], eax
mov eax, ecx
add esp, 0xc
cmp dword [eax + edi], 0
je 0x100014a7
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x10001471
jmp 0x100014ab
and dword [ebp - 8], 0
cmp dword [ebp - 8], 0
je 0x100014e5
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 0x100013f7
jmp 0x100014f8
push 0x7e
jmp 0x1000172b
push dword [esi + 0x28]
push edi
call dword [esi + 0x24]
pop ecx
pop ecx
push 0xe
jmp 0x1000172b
push dword [esi + 0x28]
push dword [ebp - 0xc]
call dword [esi + 0x24]
pop ecx
pop ecx
push 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
je 0x10001731
mov ecx, dword [esi]
movzx eax, word [ecx + 0x14]
mov edx, dword [esi + 0x30]
dec edx
lea eax, [eax + ecx + 0x18]
mov edi, dword [eax + 8]
not edx
and edx, edi
mov dword [ebp - 0x38], edi
mov edi, dword [eax + 0x10]
mov dword [ebp - 0x34], edx
test edi, edi
jne 0x10001538
mov edx, dword [eax + 0x24]
test dl, 0x40
je 0x10001531
mov edi, dword [ecx + 0x20]
jmp 0x10001538
test dl, dl
jns 0x10001538
mov edi, dword [ecx + 0x24]
mov edx, dword [eax + 0x24]
mov dword [ebp - 0x30], edi
xor edi, edi
inc edi
mov dword [ebp - 0xc], edi
cmp di, word [ecx + 6]
jae 0x10001669
lea ebx, [eax + 0x4c]
mov edi, dword [esi + 0x30]
mov eax, dword [ebx - 0x1c]
dec edi
not edi
and edi, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebx - 0x14]
mov dword [ebp + 8], eax
test eax, eax
jne 0x10001583
mov ecx, dword [ebx]
test cl, 0x40
je 0x10001577
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
jmp 0x10001580
test cl, cl
jns 0x10001583
mov eax, dword [esi]
mov eax, dword [eax + 0x24]
mov dword [ebp + 8], eax
cmp dword [ebp - 0x34], edi
je 0x10001630
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
add ecx, eax
cmp ecx, edi
ja 0x1000162d
test eax, eax
je 0x1000161d
test edx, 0x2000000
je 0x100015d5
mov ecx, dword [ebp - 0x34]
cmp dword [ebp - 0x38], ecx
jne 0x1000161d
mov edx, dword [esi]
mov ecx, dword [esi + 0x30]
cmp dword [edx + 0x38], ecx
je 0x100015c2
xor edx, edx
div ecx
test edx, edx
jne 0x1000161d
push 0x4000
push dword [ebp - 0x30]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1000161d
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 0x10001604
or eax, 0x200
lea ecx, [ebp - 8]
push ecx
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001731
mov eax, dword [ebp - 0x14]
mov edx, dword [ebx]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], edi
jmp 0x10001651
mov eax, dword [ebp + 8]
mov ecx, dword [ebx]
mov edi, 0x2000000
test edi, ecx
je 0x10001643
test edi, edx
je 0x10001643
or edx, ecx
jmp 0x1000164b
or edx, ecx
and edx, 0xfdffffff
sub eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x14]
inc dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [esi]
movzx eax, word [eax + 6]
add ebx, 0x28
cmp dword [ebp - 0xc], eax
jl 0x10001551
cmp dword [ebp - 0x30], 0
je 0x100016d4
test edx, 0x2000000
je 0x10001690
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x34]
jne 0x100016d4
push 0x4000
push dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x100016d4
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 0x100016bf
or eax, 0x200
lea ecx, [ebp + 8]
push ecx
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001731
mov eax, dword [esi]
mov eax, dword [eax + 0xc0]
mov ebx, dword [esi + 4]
test eax, eax
je 0x100016fd
mov edi, dword [ebx + eax + 0xc]
test edi, edi
je 0x100016fd
jmp 0x100016f7
push 0
push 1
push ebx
call eax
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x100016ed
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
xor edx, edx
cmp eax, edx
je 0x100017a8
cmp dword [esi + 0x14], edx
je 0x100017a0
mov ecx, dword [ebp - 0x10]
push edx
xor edi, edi
inc edi
push edi
add eax, ecx
push ecx
call eax
test eax, eax
jne 0x1000179b
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
cmp dword [esi + 0x10], ebx
je 0x10001747
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 0x10001776
xor edi, edi
cmp dword [esi + 0xc], ebx
jle 0x1000176d
mov eax, dword [esi + 8]
lea eax, [eax + edi*4]
cmp dword [eax], ebx
je 0x10001767
push dword [esi + 0x28]
push dword [eax]
call dword [esi + 0x24]
pop ecx
pop ecx
inc edi
cmp edi, dword [esi + 0xc]
jl 0x10001753
push dword [esi + 8]
call fcn.100017bf
pop ecx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x1000178a
push 0x8000
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100017ab
mov dword [esi + 0x10], edi
jmp 0x100017ab
add eax, dword [ebp - 0x10]
mov dword [esi + 0x2c], eax
jmp 0x100017ab
mov dword [esi + 0x2c], edx
pop edi
pop ebx
xor eax, eax
inc eax
pop esi
leave
ret 0xc