Function at 0x405030
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 [0x4d99e4], eax
mov eax, dword [ebp + 8]
push 0x4d99c8
mov dword [0x4d99e0], eax
call esi
push 0x4d99b0
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 0x40509c
push 0xffffffffffffffff
lea eax, [esp + 0x4c]
mov ecx, 0x4d8adc
push eax
call fcn.00405d20
mov eax, dword [0x4d8ae0]
test eax, eax
je 0x40516a
mov eax, dword [eax]
mov ebx, 0x4c3c29
test eax, eax
cmovne ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x40516a
cmp byte [ebx], 0
je 0x40516a
mov esi, ebx
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x4050d0
sub esi, ecx
lea edi, [esi + 1]
cmp esi, 0x7fff
ja 0x405156
cmp dword [0x4db1dc], 0
jne 0x4050fb
call fcn.004a8e80
mov dword [0x4db1dc], eax
test eax, eax
je 0x405156
mov ecx, dword [0x4db1d8]
cmp edi, dword [ecx + 8]
jbe 0x405118
call fcn.004a8e80
mov ecx, dword [0x4db1d8]
mov dword [ecx + 0xc], eax
test eax, eax
je 0x405156
mov ebx, dword [ecx + 4]
mov eax, edi
mov dword [0x4db1d4], ebx
and eax, 3
je 0x40512d
sub edi, eax
add edi, 4
sub dword [ecx + 8], edi
lea eax, [edi + ebx]
mov dword [ecx + 4], eax
test ebx, ebx
je 0x405152
test esi, esi
je 0x40514c
push esi
push dword [esp + 0x18]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [ebx + esi], 0
jmp 0x40516f
mov ebx, dword [esp + 0x14]
push ebx
push str.Out_of_memory.
mov ecx, 0x4dba98
call fcn.0044da60
xor ebx, ebx
jmp 0x40516f
mov ebx, 0x4c3c29
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
mov edi, 1
mov dword [0x4d99ac], ebx
mov byte [esp + 0x14], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], edi
call esi
mov ebx, edi
mov eax, dword [eax]
mov dword [esp + 0x20], eax
call esi
cmp dword [eax], ebx
jle 0x4054d6
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argv]
cmp byte [esp + 0x13], 0
mov eax, dword [eax]
mov esi, dword [eax + ebx*4]
je 0x405241
push dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push 0x4c3d98
push eax
call fcn.00405ed0
add esp, 0xc
mov edi, eax
cmp byte [esp + 0x28], 0
je 0x40537b
lea eax, [esp + 0x12]
mov ecx, 0x4dba98
push eax
push 3
lea eax, [esp + 0x20]
push eax
push edi
lea eax, [esp + 0x38]
push eax
call fcn.0043ece0
test eax, eax
jne 0x40522a
cmp byte [esp + 0x12], al
mov ecx, 0x4dba98
setne al
inc eax
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x30]
push edi
push eax
call fcn.0043f230
test eax, eax
je 0x40537b
push 1
push 0
push 0xffffffffffffffff
push esi
mov ecx, eax
call fcn.004b04f0
inc dword [esp + 0x1c]
jmp 0x4054bd
push 0x4c3d9c
push esi
call edi
add esp, 8
test eax, eax
je 0x4055f4
push str._restart
push esi
call edi
add esp, 8
test eax, eax
je 0x4055f4
push 0x4c3dac
push esi
call edi
add esp, 8
test eax, eax
je 0x4055e8
push str._force
push esi
call edi
add esp, 8
test eax, eax
je 0x4055e8
push 0xc
push str._ErrorStdOut
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
add esp, 0xc
test eax, eax
jne 0x4052c5
cmp byte [esi + 0xc], 0x3d
jne 0x4052ad
lea ecx, [esi + 0xd]
jmp 0x4052af
xor ecx, ecx
mov byte [0x4dc0cb], 1
call fcn.0042b8b0
mov dword [0x4dc0cc], eax
jmp 0x4054c3
push str._iLib
push esi
call edi
add esp, 8
test eax, eax
jne 0x405389
inc ebx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
cmp ebx, dword [eax]
jge 0x40537b
push 0x38
call fcn.004c0cb5
mov ecx, dword [0x4dc2a0]
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 0x405343
lea eax, [esi + 0x14]
mov dword [esi + 0x10], ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x405343
mov byte [esi + 0x1a], al
mov dword [esi], vtable.TextFile.0
mov dword [esi + 0x34], 0xffffffff
mov dword [0x4dc0d0], esi
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argv]
mov ecx, dword [0x4dc0d0]
push 0xfde9
push 0x15
mov eax, dword [eax]
push dword [eax + ebx*4]
call fcn.004a94b0
test al, al
jne 0x4054c3
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x4c3dd0
push esi
call edi
add esp, 8
test eax, eax
je 0x4055d9
push str._Execute
push esi
call edi
add esp, 8
test eax, eax
je 0x4055d9
push 3
push 0x4c3de0
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
add esp, 0xc
test eax, eax
jne 0x40543d
add esi, 3
mov ecx, esi
nop dword [eax]
mov al, byte [ecx]
cmp al, 0x20
je 0x4053da
cmp al, 9
jne 0x4053dd
inc ecx
jmp 0x4053d0
test al, al
je 0x405429
cmp al, 0x2d
je 0x4053e9
cmp al, 0x2b
jne 0x4053f0
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x405429
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x4053ff
cmp al, 0x58
jne 0x405429
movsx eax, byte [ecx + 2]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isxdigit]
add esp, 4
test eax, eax
je 0x405429
push 0x10
push 0
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__strtoi64]
add esp, 0xc
mov dword [0x4d99a8], eax
jmp 0x4054c3
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
add esp, 4
mov dword [0x4d99a8], eax
jmp 0x4054c3
cmp dword [0x4d8a88], 0xffffffff
jne 0x4055ae
push 6
push str._Debug
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
add esp, 0xc
test eax, eax
jne 0x4055ae
mov al, byte [esi + 6]
test al, al
je 0x405587
cmp al, 0x3d
jne 0x4055ae
add esi, 7
push 0x3a
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x40556a
mov ecx, edi
sub ecx, esi
test esi, esi
je 0x4054ab
test ecx, ecx
js 0x40549e
push ecx
jmp 0x4054a0
push 0xffffffffffffffff
push esi
mov ecx, 0x4d8a60
call fcn.00405d20
add edi, 1
je 0x4054bd
push 0xffffffffffffffff
push edi
mov ecx, 0x4d8a6c
call fcn.00405d20
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
inc ebx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
cmp ebx, dword [eax]
jl 0x4051b0
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x12]
mov ecx, 0x4dba98
push eax
push 3
lea eax, [esp + 0x20]
push eax
push 0
push 0x4c3cb0
call fcn.0043ece0
mov esi, eax
test esi, esi
jne 0x405520
cmp byte [esp + 0x12], al
mov ecx, 0x4dba98
setne al
inc eax
push eax
push dword [esp + 0x1c]
push esi
push 0x4c3cb0
call fcn.0043f230
mov esi, eax
test esi, esi
je 0x40537b
cmp byte [esi + 0x17], 0
jne 0x405529
mov esi, dword [esi + 0xc]
mov cl, byte [esi + 0x15]
test cl, 2
je 0x405542
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 0x4055fe
mov ecx, esi
call fcn.004014a0
and byte [esi + 0x15], 0x8f
jmp 0x40560e
test esi, esi
je 0x40557b
push 0xffffffffffffffff
push esi
mov ecx, 0x4d8a60
call fcn.00405d20
push 0xffffffffffffffff
push str.9000
jmp 0x4054b3
push 0xffffffffffffffff
push str.127.0.0.1
mov ecx, 0x4d8a60
call fcn.00405d20
push 0xffffffffffffffff
push str.9000
mov ecx, 0x4d8a6c
call fcn.00405d20
jmp 0x4054c3
cmp dword [0x4d99e4], 0
mov byte [esp + 0x13], 1
jne 0x4055cc
lea eax, [ebx + 1]
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
jmp 0x4054c3
dec ebx
lea eax, [ebx + 1]
mov dword [esp + 0x20], eax
jmp 0x4054c3
mov dword [0x4d99e4], 0
jmp 0x4054c3
mov byte [0x4d998a], 1
jmp 0x4054c3
mov byte [esp + 0x14], 1
jmp 0x4054c3
cmp dword [0x4d9984], 0
je 0x40560e
mov ecx, esi
call fcn.004014a0
lea eax, [esp + 0x12]
mov ecx, 0x4dba98
push eax
push 0xc1
lea eax, [esp + 0x20]
push eax
push 6
push str.A_Args
call fcn.0043ece0
mov edi, eax
test edi, edi
jne 0x405660
cmp byte [esp + 0x12], al
mov ecx, 0x4dba98
setne al
add eax, 0xc1
push eax
push dword [esp + 0x1c]
push 6
push str.A_Args
call fcn.0043f230
mov edi, eax
test edi, edi
je 0x40537b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
mov esi, dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argv]
mov ecx, dword [esp + 0x20]
sub esi, ecx
mov edx, esi
mov eax, dword [eax]
lea ecx, [eax + ecx*4]
call fcn.0049be90
test eax, eax
je 0x40537b
push eax
mov ecx, edi
call fcn.004b08a0
mov ecx, dword [0x4d70f4]
call fcn.004048d0
cmp dword [0x4d9824], 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 [0x4c3f80]
mov word [ecx + 0x78], ax
mov word [ecx + 0xd5], 0x44
mov byte [ecx + 0xd9], 1
mov dword [ecx + 0xdc], 0
je 0x405b2c
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 [0x4d99a4], eax
call esi
sub esp, 8
mov dword [0x4d99a0], eax
push dword [esp + 0x1c]
push dword [esp + 0x30]
push ecx
mov ecx, 0x4dba98
call fcn.0042c460
cmp eax, 1
jne 0x40537b
mov esi, dword [0x4d70f4]
mov ecx, 0x3a
mov edi, 0x4d9860
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x4dba98
call fcn.0042e0b0
cmp eax, 0xffffffff
jne 0x405862
mov esi, dword [0x4dc0d0]
test esi, esi
je 0x40537b
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x405849
cmp dword [esi + 0x2c], 0
jne 0x405849
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 0x405b2c
mov eax, dword [0x4d999c]
test eax, eax
jne 0x4058ac
cmp word [0x4da464], ax
jne 0x4058a0
cmp dword [0x4da44c], eax
jne 0x4058a0
cmp dword [0x4d9998], eax
jne 0x4058a0
cmp dword [0x4d9994], eax
jne 0x4058a0
cmp byte [0x4d9989], al
je 0x405921
mov dword [0x4d999c], 1
jmp 0x4058b1
cmp eax, 4
je 0x405921
cmp byte [esp + 0x14], 0
jne 0x405928
cmp byte [0x4d998a], 0
jne 0x4059a3
push dword [0x4dc0c4]
push dword [0x4d70fc]
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x4059a3
mov eax, dword [0x4d999c]
cmp eax, 3
je 0x405b2c
cmp eax, 2
je 0x40591a
push 0
push dword [0x4dc0b8]
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.004b2410
add esp, 8
cmp eax, 7
je 0x405b2c
mov eax, 0x407
jmp 0x405945
cmp byte [esp + 0x14], 0
je 0x4059a3
push dword [0x4dc0c4]
push dword [0x4d70fc]
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
test edi, edi
je 0x4059a3
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 0x40599f
cmp esi, 0x64
jne 0x40598f
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.004b2410
add esp, 8
cmp eax, 7
je 0x40537b
xor esi, esi
push 0x32
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x405968
push 0x64
call ebx
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
push 0
push 0x4d9a14
push 0
push 0x2000
call esi
test eax, eax
je 0x4059d3
cmp dword [0x4d9a14], 0
je 0x4059d3
push 2
push 0
push 0
push 0x2001
call esi
mov ecx, 0x4dba98
call fcn.0042cf20
cmp eax, 1
jne 0x40537b
push 0
push 4
push 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_setvbuf]
mov eax, dword [0x4d70f8]
add esp, 0x10
test eax, eax
je 0x405a32
imul eax, eax, 0x70
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [0x4d9990], eax
test eax, eax
je 0x405a32
imul ecx, dword [0x4d70f8], 0x70
push ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov edx, dword [0x4d8a64]
test edx, edx
je 0x405a93
cmp dword [edx + 8], 0
je 0x405a93
mov eax, dword [0x4d8a70]
mov esi, 0x4c3c29
test eax, eax
je 0x405a5b
mov eax, dword [eax]
mov ecx, esi
test eax, eax
cmovne ecx, eax
jmp 0x405a60
mov ecx, 0x4c3c29
mov eax, dword [edx]
test eax, eax
push ecx
cmovne esi, eax
push esi
call fcn.0040b3c0
test eax, eax
jne 0x405a93
cmp dword [0x4d8ab0], 2
je 0x405a93
mov ecx, 0x4d8a78
call fcn.004071e0
test eax, eax
jne 0x405a93
mov ecx, 0x4d8a78
call fcn.004072e0
push 0x4af980
push 0
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov dword [0x4d998c], eax
call fcn.00413bb0
lea eax, [esp + 0x12]
mov byte [0x4dc0c8], 1
push eax
push 3
lea eax, [esp + 0x20]
mov byte [0x4d9988], 0
push eax
push 0
push str.Clipboard
mov ecx, 0x4dba98
call fcn.0043ece0
mov esi, eax
test esi, esi
jne 0x405afe
cmp byte [esp + 0x12], al
mov ecx, 0x4dba98
setne al
inc eax
push eax
push dword [esp + 0x1c]
push esi
push str.Clipboard
call fcn.0043f230
mov esi, eax
test esi, esi
je 0x405b1e
cmp byte [esi + 0x17], 0
jne 0x405b07
mov esi, dword [esi + 0xc]
cmp byte [esi + 0x15], 0
jl 0x405b1e
mov ecx, esi
call fcn.004014a0
mov al, byte [esi + 0x15]
and al, 0xf
or al, 0x80
mov byte [esi + 0x15], al
call fcn.00405b40
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