Function at 0x40a680
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
lea ebx, [ebp - 0x30]
push 0xc
push 0x536399
push 0x1d
push 0x53637c
push ebx
call fcn.0040afd0
add esp, 0x14
mov edi, dword [ebp - 0x2c]
push edi
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40a6c1
push 1
push eax
push edi
call fcn.0040d1e0
add esp, 0xc
test esi, esi
je 0x40aa92
push 0xc
push 0x5363d5
push 0x1d
push 0x5363b8
push ebx
call fcn.0040afd0
add esp, 0x14
mov edi, dword [ebp - 0x2c]
push edi
push esi
call sub.kernel32.dll_GetProcAddress
mov esi, eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40a6ff
push 1
push eax
push edi
call fcn.0040d1e0
add esp, 0xc
test esi, esi
je 0x40aac0
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push esi
push edi
call fcn.00409af0
add esp, 8
mov ebx, eax
push esi
push edi
call fcn.00409cd0
add esp, 8
mov edx, dword [edi + 0x3c]
xor esi, esi
cmp dword [edx + edi], 0x4550
lea ecx, [edx + edi]
mov dword [ebp - 0x3c], edx
cmove esi, ecx
mov ecx, dword [esi + 0x34]
push 4
push 0x1000
mov dword [ebp - 0x34], eax
push eax
mov dword [ebp - 0x40], ecx
push ecx
call sub.kernel32.dll_VirtualAlloc
test eax, eax
mov ecx, eax
mov dword [ebp - 0x10], eax
jne 0x40a776
push 4
push 0x1000
push dword [ebp - 0x34]
push 0
call sub.kernel32.dll_VirtualAlloc
test eax, eax
mov ecx, eax
mov dword [ebp - 0x10], eax
je 0x40aaf1
push ebx
push dword [ebp + 8]
push dword [ebp - 0x10]
call sub.msvcrt.dll_memcpy
add esp, 0xc
movzx ebx, word [esi + 6]
mov dword [ebp - 0x18], esi
test bx, bx
je 0x40a7e1
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x10]
mov edi, 1
lea esi, [eax + ecx + 0x10c]
nop word cs:[eax + eax]
nop dword [eax]
mov eax, dword [esi - 4]
mov ecx, dword [esi]
lea edx, [ecx + eax]
cmp edx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea edx, [edx + ecx]
cmova edx, edi
add ecx, eax
mov ecx, dword [esi - 8]
cmovb edx, edi
add ecx, dword [ebp - 0x10]
push eax
push edx
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
add esi, 0x28
dec bx
jne 0x40a7b0
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x84], 0
je 0x40a8d1
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x80]
mov eax, dword [ebp - 0x10]
mov esi, dword [ecx + eax + 0xc]
test esi, esi
je 0x40a8d1
mov eax, dword [ebp - 0x10]
add ecx, eax
add eax, 2
mov dword [ebp - 0x48], eax
jmp 0x40a831
mov ecx, dword [ebp - 0x44]
mov esi, dword [ecx + 0x20]
add ecx, 0x14
test esi, esi
je 0x40a8d1
mov eax, dword [ecx + 0x10]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x40a8d1
add esi, dword [ebp - 0x10]
mov edi, dword [ecx]
mov dword [ebp - 0x44], ecx
mov eax, esi
nop dword [eax]
cmp byte [eax], 0
lea eax, [eax + 1]
jne 0x40a850
push esi
call sub.kernel32.dll_LoadLibraryA
mov ebx, eax
inc eax
cmp eax, 1
ja 0x40a86e
push esi
call sub.kernel32.dll_GetModuleHandleA
mov ebx, eax
test edi, edi
mov eax, dword [ebp - 0x10]
cmove edi, dword [ebp - 0x14]
mov eax, dword [edi + eax]
test eax, eax
je 0x40a820
mov ecx, dword [ebp - 0x10]
xor esi, esi
add dword [ebp - 0x14], ecx
add edi, ecx
jmp 0x40a8b1
and eax, 0x7fffffff
push eax
push ebx
call sub.kernel32.dll_GetProcAddress
mov ecx, dword [ebp - 0x14]
mov dword [ecx + esi*4], eax
mov eax, dword [edi + 4]
inc esi
add edi, 4
test eax, eax
je 0x40a820
test eax, eax
js 0x40a890
add eax, dword [ebp - 0x48]
mov ecx, 0xffffffff
nop dword [eax]
cmp byte [eax + ecx + 1], 0
lea ecx, [ecx + 1]
jne 0x40a8c0
cmp ecx, 2
jae 0x40a895
jmp 0x40a8a2
mov edi, dword [ebp - 0x40]
cmp edi, dword [ebp - 0x10]
je 0x40a961
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0xa4], 0
je 0x40a961
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov eax, dword [eax + 0xa0]
mov esi, dword [eax + ecx + 4]
test esi, esi
je 0x40a961
mov edx, dword [ebp - 0x10]
mov ecx, edx
lea ebx, [eax + edx + 4]
add eax, edx
sub ecx, edi
jmp 0x40a926
mov edx, dword [ebp - 0x14]
mov esi, dword [edx]
lea edi, [eax + esi]
lea ebx, [eax + esi + 4]
mov esi, dword [eax + esi + 4]
mov eax, edi
test esi, esi
je 0x40a961
lea edi, [esi - 8]
cmp edi, 2
jb 0x40a915
shr edi, 1
lea esi, [eax + 8]
mov dword [ebp - 0x14], ebx
jmp 0x40a946
add esi, 2
dec edi
je 0x40a910
movzx ebx, word [esi]
cmp ebx, 0x1000
jb 0x40a940
and ebx, 0xfff
mov edx, dword [eax]
add ebx, dword [ebp - 0x10]
add dword [edx + ebx], ecx
jmp 0x40a940
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
movzx edx, word [eax + 6]
test dx, dx
mov word [ebp - 0x36], dx
je 0x40aa28
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0x34], esi
neg edx
mov bx, 1
mov dword [ebp - 0x14], edx
lea edi, [eax + esi + 0x104]
jmp 0x40a9a2
lea eax, [edx + ebx + 1]
add edi, 0x28
inc ebx
cmp ax, 1
je 0x40aa28
mov eax, dword [edi + 4]
test eax, eax
je 0x40a990
mov ecx, dword [edi]
add ecx, esi
cmp dword [ebp - 0x34], ecx
jbe 0x40a990
mov esi, dword [edi + 0x18]
mov edx, esi
and edx, 0x20000000
test esi, 0x40000000
jne 0x40a9e0
test esi, esi
js 0x40a9f2
test edx, edx
mov edx, 0x10
mov esi, 1
jmp 0x40aa03
test esi, esi
js 0x40a9f7
test edx, edx
mov edx, 0x20
mov esi, 2
jmp 0x40aa03
shr edx, 0x16
jmp 0x40aa06
test edx, edx
mov edx, 0x40
mov esi, 4
cmove edx, esi
lea esi, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
push esi
push edx
push eax
push ecx
call 0x4f3054
test eax, eax
je 0x40aa3f
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
jmp 0x40a990
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
add eax, esi
push 0
push 1
push esi
call eax
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
call sub.kernel32.dll_GetLastError
lea eax, [ebp - 0x38]
lea edx, [ebp - 0x36]
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x30], 0x536270
mov dword [ebp - 0x2c], 2
mov dword [ebp - 0x20], 0
mov word [ebp - 0x38], bx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], fcn.004ec730
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x50], fcn.004ec730
mov dword [ebp - 0x24], 2
push 0x536280
lea eax, [ebp - 0x30]
push eax
call fcn.004dc2b0
mov dword [ebp - 0x30], 4
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 4
mov dword [ebp - 0x24], 0
push 0x5363a8
push ebx
call fcn.004dc2b0
mov dword [ebp - 0x30], 4
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 4
mov dword [ebp - 0x24], 0
push 0x5363e4
lea eax, [ebp - 0x30]
push eax
call fcn.004dc2b0
mov dword [ebp - 0x30], 4
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 4
mov dword [ebp - 0x24], 0
push 0x53636c
lea eax, [ebp - 0x30]
push eax
call fcn.004dc2b0
nop word cs:[eax + eax]
nop dword [eax]
push ebp
mov ebp, esp
pop ebp
jmp 0x4f3054
jmp dword [sym.imp.kernel32.dll_VirtualProtect]