Function at 0x405070
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x144
push ebx
push esi
push edi
push 0xa
push str.E4847ED08866458F8DD35F94B37001C0
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4fb9d4], eax
mov eax, dword [ebp + 8]
push 0x4fb9b8
mov dword [0x4fb9d0], eax
call esi
push 0x4fb9a0
call esi
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
lea eax, [esp + 0x48]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4050dc
push 0xffffffffffffffff
lea eax, [esp + 0x4c]
mov ecx, 0x4fa374
push eax
call fcn.00405d50
mov eax, dword [0x4fa378]
test eax, eax
je 0x4051aa
mov eax, dword [eax]
mov ebx, 0x4e3371
test eax, eax
cmovne ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x4051aa
cmp byte [ebx], 0
je 0x4051aa
mov esi, ebx
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x405110
sub esi, ecx
lea edi, [esi + 1]
cmp esi, 0x7fff
ja 0x405196
cmp dword [0x4fd1cc], 0
jne 0x40513b
call fcn.004a8b90
mov dword [0x4fd1cc], eax
test eax, eax
je 0x405196
mov ecx, dword [0x4fd1c8]
cmp edi, dword [ecx + 8]
jbe 0x405158
call fcn.004a8b90
mov ecx, dword [0x4fd1c8]
mov dword [ecx + 0xc], eax
test eax, eax
je 0x405196
mov ebx, dword [ecx + 4]
mov eax, edi
mov dword [0x4fd1c4], ebx
and eax, 3
je 0x40516d
sub edi, eax
add edi, 4
sub dword [ecx + 8], edi
lea eax, [edi + ebx]
mov dword [ecx + 4], eax
test ebx, ebx
je 0x405192
test esi, esi
je 0x40518c
push esi
push dword [esp + 0x18]
push ebx
call fcn.004c2440
add esp, 0xc
mov byte [ebx + esi], 0
jmp 0x4051af
mov ebx, dword [esp + 0x14]
push ebx
push str.Out_of_memory.
mov ecx, 0x4fda88
call fcn.0044dd10
xor ebx, ebx
jmp 0x4051af
mov ebx, 0x4e3371
mov edi, 1
mov dword [0x4fb99c], ebx
mov byte [esp + 0x14], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], edi
call fcn.004c5046
mov ebx, edi
mov eax, dword [eax]
mov dword [esp + 0x20], eax
call fcn.004c5046
cmp dword [eax], ebx
jle 0x40551a
nop word [eax + eax]
call fcn.004c504c
cmp byte [esp + 0x13], 0
mov eax, dword [eax]
mov esi, dword [eax + ebx*4]
je 0x405286
push edi
lea eax, [esp + 0x2c]
push 0x4e34e0
push eax
call fcn.00405f00
add esp, 0xc
mov edi, eax
cmp byte [esp + 0x28], 0
je 0x4053cc
lea eax, [esp + 0x12]
mov ecx, 0x4fda88
push eax
push 3
lea eax, [esp + 0x20]
push eax
push edi
lea eax, [esp + 0x38]
push eax
call fcn.0043eed0
test eax, eax
jne 0x40526a
cmp byte [esp + 0x12], al
mov ecx, 0x4fda88
setne al
inc eax
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x30]
push edi
push eax
call fcn.0043f410
test eax, eax
je 0x4053cc
push 1
push 0
push 0xffffffffffffffff
push esi
mov ecx, eax
call fcn.004b01a0
mov edi, dword [esp + 0x1c]
inc edi
mov dword [esp + 0x1c], edi
jmp 0x40550c
push 0x4e34e4
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x405638
push str._restart
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x405638
push 0x4e34f4
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x40562c
push str._force
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x40562c
push 0xc
push str._ErrorStdOut
push esi
call fcn.004c4e4b
add esp, 0xc
test eax, eax
jne 0x405315
cmp byte [esi + 0xc], 0x3d
jne 0x4052fd
lea ecx, [esi + 0xd]
jmp 0x4052ff
xor ecx, ecx
mov byte [0x4fe0bb], 1
call fcn.0042b850
mov dword [0x4fe0bc], eax
jmp 0x40550c
push str._iLib
push esi
call fcn.004c408e
add esp, 8
test eax, eax
jne 0x4053da
inc ebx
call fcn.004c5046
cmp ebx, dword [eax]
jge 0x4053cc
push 0x38
call fcn.004c0946
mov ecx, dword [0x4fe290]
mov esi, eax
add esp, 4
mov dword [esi], vtable.TextStream.0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
cmp ecx, 0xffffffff
je 0x405395
lea eax, [esi + 0x14]
mov dword [esi + 0x10], ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x405395
mov byte [esi + 0x1a], al
mov dword [esi], vtable.TextFile.0
mov dword [esi + 0x34], 0xffffffff
mov dword [0x4fe0c0], esi
call fcn.004c504c
mov ecx, dword [0x4fe0c0]
push 0xfde9
push 0x15
mov eax, dword [eax]
push dword [eax + ebx*4]
call fcn.004a91c0
test al, al
jne 0x40550c
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x4e3518
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x40561d
push str._Execute
push esi
call fcn.004c408e
add esp, 8
test eax, eax
je 0x40561d
push 3
push 0x4e3528
push esi
call fcn.004c4e4b
add esp, 0xc
test eax, eax
jne 0x40548a
add esi, 3
mov ecx, esi
nop
mov al, byte [ecx]
cmp al, 0x20
je 0x40542a
cmp al, 9
jne 0x40542d
inc ecx
jmp 0x405420
test al, al
je 0x405477
cmp al, 0x2d
je 0x405439
cmp al, 0x2b
jne 0x405440
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x405477
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x40544f
cmp al, 0x58
jne 0x405477
movsx eax, byte [ecx + 2]
push eax
call fcn.004c4410
add esp, 4
test eax, eax
je 0x405477
push 0x10
push 0
push esi
call fcn.004c4c8d
add esp, 0xc
mov dword [0x4fb998], eax
jmp 0x40550c
push esi
call fcn.004c4db1
add esp, 4
mov dword [0x4fb998], eax
jmp 0x40550c
cmp dword [0x4fa320], 0xffffffff
jne 0x4055f2
push 6
push str._Debug
push esi
call fcn.004c4e4b
add esp, 0xc
test eax, eax
jne 0x4055f2
mov al, byte [esi + 6]
test al, al
je 0x4055cb
cmp al, 0x3d
jne 0x4055f2
add esi, 7
push 0x3a
push esi
call fcn.004c7059
mov edi, eax
add esp, 8
test edi, edi
je 0x4055ae
mov ecx, edi
sub ecx, esi
test esi, esi
je 0x4054f6
test ecx, ecx
js 0x4054e9
push ecx
jmp 0x4054eb
push 0xffffffffffffffff
push esi
mov ecx, 0x4fa2f8
call fcn.00405d50
add edi, 1
je 0x405508
push 0xffffffffffffffff
push edi
mov ecx, 0x4fa304
call fcn.00405d50
mov edi, dword [esp + 0x1c]
inc ebx
call fcn.004c5046
cmp ebx, dword [eax]
jl 0x4051f0
lea eax, [esp + 0x12]
mov ecx, 0x4fda88
push eax
push 3
lea eax, [esp + 0x20]
push eax
push 0
push 0x4e33f8
call fcn.0043eed0
mov esi, eax
test esi, esi
jne 0x405564
cmp byte [esp + 0x12], al
mov ecx, 0x4fda88
setne al
inc eax
push eax
push dword [esp + 0x1c]
push esi
push 0x4e33f8
call fcn.0043f410
mov esi, eax
test esi, esi
je 0x4053cc
cmp byte [esi + 0x17], 0
jne 0x40556d
mov esi, dword [esi + 0xc]
mov cl, byte [esi + 0x15]
test cl, 2
je 0x405586
mov eax, dword [esi]
and cl, 0x3d
mov byte [esi + 0x15], cl
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov cl, byte [esi + 0x15]
lea eax, [edi - 1]
and cl, 0x8b
cdq
or cl, 0x18
mov dword [esi], eax
mov dword [esi + 4], edx
mov byte [esi + 0x15], cl
jge 0x405642
mov ecx, esi
call fcn.004014d0
and byte [esi + 0x15], 0x8f
jmp 0x405652
test esi, esi
je 0x4055bf
push 0xffffffffffffffff
push esi
mov ecx, 0x4fa2f8
call fcn.00405d50
push 0xffffffffffffffff
push str.9000
jmp 0x4054fe
push 0xffffffffffffffff
push str.127.0.0.1
mov ecx, 0x4fa2f8
call fcn.00405d50
push 0xffffffffffffffff
push str.9000
mov ecx, 0x4fa304
call fcn.00405d50
jmp 0x40550c
cmp dword [0x4fb9d4], 0
mov byte [esp + 0x13], 1
jne 0x405610
lea eax, [ebx + 1]
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
jmp 0x40550c
dec ebx
lea eax, [ebx + 1]
mov dword [esp + 0x20], eax
jmp 0x40550c
mov dword [0x4fb9d4], 0
jmp 0x40550c
mov byte [0x4fb97a], 1
jmp 0x40550c
mov byte [esp + 0x14], 1
jmp 0x40550c
cmp dword [0x4fb974], 0
je 0x405652
mov ecx, esi
call fcn.004014d0
lea eax, [esp + 0x12]
mov ecx, 0x4fda88
push eax
push 0xc1
lea eax, [esp + 0x20]
push eax
push 6
push str.A_Args
call fcn.0043eed0
mov edi, eax
test edi, edi
jne 0x4056a4
cmp byte [esp + 0x12], al
mov ecx, 0x4fda88
setne al
add eax, 0xc1
push eax
push dword [esp + 0x1c]
push 6
push str.A_Args
call fcn.0043f410
mov edi, eax
test edi, edi
je 0x4053cc
call fcn.004c5046
mov ebx, dword [esp + 0x20]
mov esi, dword [eax]
sub esi, ebx
call fcn.004c504c
mov edx, esi
mov eax, dword [eax]
lea ecx, [eax + ebx*4]
call fcn.0049bd60
test eax, eax
je 0x4053cc
push eax
mov ecx, edi
call fcn.004b0550
mov ecx, dword [0x4f898c]
call fcn.00404930
cmp dword [0x4fb814], 0
mov dword [ecx + 0xb4], 0
mov dword [ecx + 0x20], 1
mov dword [ecx + 0xc9], 0x1010001
mov dword [ecx], 0xffffffff
mov dword [ecx + 4], 0xffffffff
mov dword [ecx + 0x24], 0xa
mov dword [ecx + 0xb8], 5
mov dword [ecx + 0xc0], 0
mov word [ecx + 0xcd], 1
mov dword [ecx + 0x2c], 0
mov dword [ecx + 0x30], 0
mov dword [ecx + 0x34], 0
mov dword [ecx + 0x38], 0
mov dword [ecx + 0x3c], connect
mov dword [ecx + 0x40], connect
mov dword [ecx + 0x44], 0
mov dword [ecx + 0x50], 0x2af8
mov dword [ecx + 0x48], 0
mov dword [ecx + 0x54], 0x64
mov dword [ecx + 0x58], 0x14
mov dword [ecx + 0x5c], 0xa
mov dword [ecx + 0x60], 0xffffffff
mov dword [ecx + 0x64], 0xffffffff
mov dword [ecx + 0x68], 0xffffffff
mov dword [ecx + 0x6c], 0xa
mov dword [ecx + 0x70], 0xffffffff
mov byte [ecx + 0xcf], 2
mov dword [ecx + 0xd0], 0x1000000
mov byte [ecx + 0xd4], 1
mov eax, dword [str._0.6f]
mov dword [ecx + 0x74], eax
mov ax, word [0x4e36c8]
mov word [ecx + 0x78], ax
mov word [ecx + 0xd5], 0x44
mov byte [ecx + 0xd9], 1
mov dword [ecx + 0xdc], 0
je 0x405b71
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.CryptEncrypt
push edi
call esi
push str.CryptDecrypt
push edi
mov dword [0x4fb994], eax
call esi
sub esp, 8
mov dword [0x4fb990], eax
push dword [esp + 0x1c]
push dword [esp + 0x30]
push ecx
mov ecx, 0x4fda88
call fcn.0042c3f0
cmp eax, 1
jne 0x4053cc
mov esi, dword [0x4f898c]
mov ecx, 0x3a
mov edi, 0x4fb850
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x4fda88
call fcn.0042e030
cmp eax, 0xffffffff
jne 0x4058a4
mov esi, dword [0x4fe0c0]
test esi, esi
je 0x4053cc
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x40588b
cmp dword [esi + 0x2c], 0
jne 0x40588b
mov eax, dword [esi]
push ecx
push dword [esi + 0x30]
mov ecx, esi
call dword [eax + 0x10]
mov dword [esi + 8], 0
mov eax, dword [esi]
mov ecx, esi
mov byte [esi + 0x28], 0
call dword [eax + 8]
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
test eax, eax
je 0x405b71
mov eax, dword [0x4fb98c]
test eax, eax
jne 0x4058ee
cmp word [0x4fc454], ax
jne 0x4058e2
cmp dword [0x4fc43c], eax
jne 0x4058e2
cmp dword [0x4fb988], eax
jne 0x4058e2
cmp dword [0x4fb984], eax
jne 0x4058e2
cmp byte [0x4fb979], al
je 0x405963
mov dword [0x4fb98c], 1
jmp 0x4058f3
cmp eax, 4
je 0x405963
cmp byte [esp + 0x14], 0
jne 0x40596e
cmp byte [0x4fb97a], 0
jne 0x4059eb
push dword [0x4fe0b4]
push dword [0x4f8994]
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x4059eb
mov eax, dword [0x4fb98c]
cmp eax, 3
je 0x405b71
cmp eax, 2
je 0x40595c
push 0
push dword [0x4fe0a8]
xorps xmm3, xmm3
mov edx, 4
mov ecx, str.An_older_instance_of_this_script_is_already_running.__Replace_it_with_this_instance__nNote:_To_avoid_this_message__see_SingleInstance_in_the_help_file.
call fcn.004b20a0
add esp, 8
cmp eax, 7
je 0x405b71
mov eax, 0x407
jmp 0x40598b
cmp byte [esp + 0x14], 0
je 0x4059eb
push dword [0x4fe0b4]
push dword [0x4f8994]
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x4059eb
mov eax, 0x406
push 0
push eax
push 0x44
push edi
call dword [sym.imp.USER32.dll_PostMessageA]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
push 0x32
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4059e7
nop
cmp esi, 0x64
jne 0x4059d7
push 0
push 0
xorps xmm3, xmm3
lea edx, [esi - 0x60]
mov ecx, str.Could_not_close_the_previous_instance_of_this_script.__Keep_waiting_
call fcn.004b20a0
add esp, 8
cmp eax, 7
je 0x4053cc
xor esi, esi
push 0x32
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4059b0
push 0x64
call ebx
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
push 0
push 0x4fba04
push 0
push 0x2000
call esi
test eax, eax
je 0x405a1b
cmp dword [0x4fba04], 0
je 0x405a1b
push 2
push 0
push 0
push 0x2001
call esi
mov ecx, 0x4fda88
call fcn.0042ceb0
cmp eax, 1
jne 0x4053cc
push 0
push 4
push 0
push eax
call fcn.004c73cd
add esp, 4
push eax
call fcn.004c72cb
mov eax, dword [0x4f8990]
add esp, 0x10
test eax, eax
je 0x405a77
imul eax, eax, 0x70
push eax
call fcn.004c4e35
add esp, 4
mov dword [0x4fb980], eax
test eax, eax
je 0x405a77
imul ecx, dword [0x4f8990], 0x70
push ecx
push 0
push eax
call fcn.004c22a0
add esp, 0xc
mov edx, dword [0x4fa2fc]
test edx, edx
je 0x405ad8
cmp dword [edx + 8], 0
je 0x405ad8
mov eax, dword [0x4fa308]
mov esi, 0x4e3371
test eax, eax
je 0x405aa0
mov eax, dword [eax]
mov ecx, esi
test eax, eax
cmovne ecx, eax
jmp 0x405aa5
mov ecx, 0x4e3371
mov eax, dword [edx]
test eax, eax
push ecx
cmovne esi, eax
push esi
call fcn.0040b370
test eax, eax
jne 0x405ad8
cmp dword [0x4fa348], 2
je 0x405ad8
mov ecx, 0x4fa310
call fcn.004071f0
test eax, eax
jne 0x405ad8
mov ecx, 0x4fa310
call fcn.004072f0
push 0x4af620
push 0
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov dword [0x4fb97c], eax
call fcn.00413b40
lea eax, [esp + 0x12]
mov byte [0x4fe0b8], 1
push eax
push 3
lea eax, [esp + 0x20]
mov byte [0x4fb978], 0
push eax
push 0
push str.Clipboard
mov ecx, 0x4fda88
call fcn.0043eed0
mov esi, eax
test esi, esi
jne 0x405b43
cmp byte [esp + 0x12], al
mov ecx, 0x4fda88
setne al
inc eax
push eax
push dword [esp + 0x1c]
push esi
push str.Clipboard
call fcn.0043f410
mov esi, eax
test esi, esi
je 0x405b63
cmp byte [esi + 0x17], 0
jne 0x405b4c
mov esi, dword [esi + 0xc]
cmp byte [esi + 0x15], 0
jl 0x405b63
mov ecx, esi
call fcn.004014d0
mov al, byte [esi + 0x15]
and al, 0xf
or al, 0x80
mov byte [esi + 0x15], al
call fcn.00405b80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10