Function at 0x407440
Capabilities:
Create directory
Create process on windows
Delete directory
Delete file
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c0
mov eax, dword [0x47e064]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x2c0], eax
mov esi, ebx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2bc], eax
mov eax, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x2a4], ebx
lea ecx, [esi + 2]
mov dword [ebp - 0x2b8], eax
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x407480
sub esi, ecx
sar esi, 1
cmp esi, 0x10
jb 0x4074a8
lea eax, [esi*2 + 2]
push eax
call fcn.00438180
add esp, 4
mov ecx, eax
jmp 0x4074ae
lea ecx, [ebp - 0x22c]
lea eax, [esi + 1]
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x230], eax
mov esi, ebx
xor eax, eax
mov word [ecx], ax
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4074c7
sub esi, ecx
sar esi, 1
lea eax, [esi + esi]
push eax
push ebx
push dword [ebp - 0x238]
call fcn.0042ec90
mov eax, dword [ebp - 0x230]
add esp, 0xc
cmp esi, eax
jb 0x4074f6
lea esi, [eax - 1]
test eax, eax
jne 0x4074fe
xor esi, esi
jmp 0x40750a
mov eax, dword [ebp - 0x238]
xor ecx, ecx
mov word [eax + esi*2], cx
push 1
lea eax, [ebp - 0x238]
mov dword [ebp - 0x234], esi
push eax
lea eax, [ebp - 0x2b4]
push eax
call fcn.004056b0
mov eax, dword [ebp - 0x238]
add esp, 0xc
test eax, eax
je 0x407545
lea ecx, [ebp - 0x22c]
cmp eax, ecx
je 0x407545
push eax
call fcn.0043817b
add esp, 4
cmp byte [ebp + 0x20], 0
mov edi, 0x4777b4
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x4076b8
mov edx, dword [ebp - 0x2a4]
mov esi, edx
lea ecx, [esi + 2]
nop dword [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x407570
sub esi, ecx
sar esi, 1
cmp esi, 0x10
jb 0x40759e
lea eax, [esi*2 + 2]
push eax
call fcn.00438180
mov edx, dword [ebp - 0x2a4]
add esp, 4
mov ecx, eax
jmp 0x4075a4
lea ecx, [ebp - 0x258]
lea eax, [esi + 1]
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x25c], eax
mov esi, edx
xor eax, eax
mov word [ecx], ax
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4075c0
sub esi, ecx
sar esi, 1
lea eax, [esi + esi]
push eax
push edx
push dword [ebp - 0x264]
call fcn.0042ec90
mov eax, dword [ebp - 0x25c]
add esp, 0xc
cmp esi, eax
jb 0x4075ef
lea esi, [eax - 1]
test eax, eax
jne 0x4075f7
xor esi, esi
jmp 0x407603
mov eax, dword [ebp - 0x264]
xor ecx, ecx
mov word [eax + esi*2], cx
push str.gcc_instal_test.dat
lea eax, [ebp - 0x264]
mov dword [ebp - 0x260], esi
push eax
lea ecx, [ebp - 0x290]
call fcn.00403550
mov ecx, eax
call fcn.00403ce0
push eax
lea ecx, [ebp - 0x238]
call fcn.00401a50
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x407650
lea ecx, [ebp - 0x284]
cmp eax, ecx
je 0x407650
push eax
call fcn.0043817b
add esp, 4
push 0
push 0x46a404
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x2b4]
call fcn.004035e0
mov eax, dword [ebp - 0x2b4]
cmp eax, 0xffffffff
jne 0x4077b0
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x407695
lea ecx, [ebp - 0x22c]
cmp eax, ecx
je 0x407695
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x4076b2
lea ecx, [ebp - 0x258]
cmp eax, ecx
je 0x4076b2
push eax
call fcn.0043817b
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp + 0x18], 0
jne 0x40787a
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x238], eax
xor eax, eax
mov word [ebp - 0x22c], ax
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
mov dword [ebp - 0x230], 1
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [ebp - 0x2b8]
lea eax, [ebp - 0x238]
push str._s__ELEVATED
push eax
call fcn.00406e20
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x290], eax
add esp, 0xc
mov eax, dword [ebp - 0x238]
xorps xmm0, xmm0
test eax, eax
movlpd qword [ebp - 0x288], xmm0
movlpd qword [ebp - 0x280], xmm0
cmovne edi, eax
movlpd qword [ebp - 0x278], xmm0
lea eax, [ebp - 0x2a0]
movlpd qword [ebp - 0x270], xmm0
push eax
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x2a0], 0x3c
mov dword [ebp - 0x294], str.runas
mov dword [ebp - 0x28c], edi
mov dword [ebp - 0x29c], 0x40
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x4079cd
call esi
mov esi, eax
jmp 0x407a06
push eax
call ebx
mov eax, dword [ebp - 0x238]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4077d3
call esi
mov eax, dword [ebp - 0x238]
mov ecx, edi
test eax, eax
push 0
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
mov eax, dword [ebp - 0x238]
jne 0x407834
test eax, eax
je 0x40780a
lea ecx, [ebp - 0x22c]
cmp eax, ecx
je 0x40780a
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x4076b8
lea ecx, [ebp - 0x258]
cmp eax, ecx
je 0x4076b8
push eax
call fcn.0043817b
add esp, 4
jmp 0x4076b8
test eax, eax
cmovne edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x40785d
lea ecx, [ebp - 0x22c]
cmp eax, ecx
je 0x40785d
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x40787a
lea ecx, [ebp - 0x258]
cmp eax, ecx
je 0x40787a
push eax
call fcn.0043817b
add esp, 4
push dword [ebp - 0x2bc]
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x2b0], 0x46b39c
push 0x46b3a8
push 0xffffffffffffffff
push 0x104
push eax
mov dword [ebp - 0x2ac], 0
call fcn.00402f20
add esp, 0x14
mov byte [ebp - 0x23c], 0
lea eax, [ebp - 0x25c]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x248], 0xc
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x20c]
push eax
push 0x1f58
push 0
push 4
lea eax, [ebp - 0x248]
mov dword [ebp - 0x240], 0
push eax
push 0xffffffffffffffff
mov byte [ebp - 0x23c], 1
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x2a8], eax
call esi
push 0
push 0
push 0
push 0xf001f
push dword [ebp - 0x2a8]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x2a8]
mov dword [ebp - 0x2ac], eax
cmp ecx, 0xffffffff
je 0x40795b
test eax, eax
jne 0x40795f
push ecx
call ebx
mov eax, dword [ebp - 0x2ac]
test eax, eax
je 0x40796f
push 0x1f58
push 0
push eax
call fcn.0042f790
add esp, 0xc
push dword [ebp + 0x24]
lea ecx, [ebp - 0x2b0]
push dword [ebp + 0x20]
push dword [ebp - 0x2a4]
push dword [ebp + 0xc]
push dword [ebp - 0x2c0]
call fcn.00407290
mov ecx, dword [ebp - 0x2ac]
mov esi, eax
mov dword [ebp - 0x2b0], 0x46b39c
test ecx, ecx
je 0x4079ac
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x2a8]
cmp eax, 0xffffffff
je 0x4079ba
push eax
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042d480
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a4], 0xffffffff
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x268]
call ebx
mov esi, dword [ebp - 0x2a4]
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x4079ba
lea ecx, [ebp - 0x22c]
cmp eax, ecx
je 0x4079ba
push eax
call fcn.0043817b
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, esi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0042d480
mov esp, ebp
pop ebp
ret