Function at 0x401c30
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10450
call fcn.00402610
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401c76
push str.Unable_to_determine_the_path_to_the_current_process_binary._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401c00
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push ebx
push esi
push edi
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call sub.VCRUNTIME140.dll_strrchr
mov esi, eax
lea eax, [ebp - 0x20c]
push 0x2f
push eax
call sub.VCRUNTIME140.dll_strrchr
add esp, 0x10
test esi, esi
je 0x401ca2
cmp esi, eax
jae 0x401ca4
mov esi, eax
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
lea eax, [ebp - 0x20c]
test esi, esi
je 0x401cb7
lea eax, [esi + 1]
push eax
call edi
mov esi, eax
add esp, 4
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401cc4
sub ecx, edx
lea ebx, [ecx + esi]
mov ecx, str..exe
lea eax, [ebx - 4]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401cf8
test dl, dl
je 0x401cf4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401cf8
add eax, 2
add ecx, 2
test dl, dl
jne 0x401cd8
xor eax, eax
jmp 0x401cfd
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401d04
mov byte [ebx - 4], al
lea eax, [ebp - 0x20c]
mov dword [0x406398], esi
push 0x5c
push eax
call sub.VCRUNTIME140.dll_strrchr
mov esi, eax
lea eax, [ebp - 0x20c]
push 0x2f
push eax
call sub.VCRUNTIME140.dll_strrchr
add esp, 0x10
test esi, esi
je 0x401d33
cmp esi, eax
jae 0x401d35
mov esi, eax
test esi, esi
jne 0x401d47
push 0x4041dc
call edi
add esp, 4
mov ebx, eax
jmp 0x401db1
lea eax, [ebp - 0x20c]
cmp esi, eax
jne 0x401d5f
push 0x4041e0
call edi
add esp, 4
mov ebx, eax
jmp 0x401db1
lea eax, [ebp - 0x20c]
sub esi, eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x401d9b
push 0x4041e4
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401c00
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push esi
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov byte [esi + ebx], 0
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
push 1
push 0x4041e0
push ebx
call esi
add esp, 0xc
test eax, eax
je 0x401e7d
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401dd1
sub ecx, edx
cmp ecx, 1
jbe 0x401df7
push 1
lea eax, [ebx + 1]
push 0x40445c
push eax
call esi
add esp, 0xc
test eax, eax
je 0x401e7d
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401e00
sub ecx, edx
cmp ecx, 1
jbe 0x401e1f
push 1
push 0x4041d8
push ebx
call esi
add esp, 0xc
test eax, eax
je 0x401e7d
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__getcwd]
add esp, 8
test eax, eax
je 0x401e92
lea edi, [ebp - 0x108]
dec edi
nop
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x401e40
mov ax, word [0x4041d8]
mov esi, ebx
mov word [edi], ax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x401e55
lea edi, [ebp - 0x108]
sub ebx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401e65
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x401e92
lea ecx, [ebp - 0x108]
sub ecx, ebx
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx + ebx - 1], al
test al, al
jne 0x401e85
mov eax, dword [str.PATH]
mov dword [ebp - 0x8450], eax
mov ax, word [0x404464]
push 0x4041b0
mov word [ebp - 0x844c], ax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, eax
add esp, 4
test edx, edx
je 0x401f03
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x401ec0
lea edi, [ebp - 0x8450]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401ed0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x8450]
dec edi
nop dword [eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x401ef0
mov ax, word [0x404468]
mov word [edi], ax
push str.IsWow64Process
push str.kernel32
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x401f34
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 4], 0
lea edx, [ebp - 0x108]
mov ebx, dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, edx
je 0x4020c0
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x401f50
lea edi, [ebp - 0x8450]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401f60
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x8450]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x401f80
mov eax, dword [str....._binwin64_]
lea edx, [ebp - 0x108]
mov dword [ecx], eax
mov esi, edx
mov eax, dword [0x404470]
mov dword [ecx + 4], eax
mov eax, dword [0x404474]
mov dword [ecx + 8], eax
mov eax, dword [0x404478]
mov dword [ecx + 0xc], eax
mov ax, word [0x40447c]
mov word [ecx + 0x10], ax
mov al, byte [0x40447e]
mov byte [ecx + 0x12], al
mov al, byte [edx]
inc edx
test al, al
jne 0x401fc3
lea edi, [ebp - 0x8450]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401fd3
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x8450]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x401ff0
mov eax, dword [str....._binwin32_]
mov dword [ecx], eax
mov eax, dword [0x404484]
mov dword [ecx + 4], eax
mov eax, dword [0x404488]
mov dword [ecx + 8], eax
mov eax, dword [0x40448c]
mov dword [ecx + 0xc], eax
mov ax, word [0x404490]
mov word [ecx + 0x10], ax
mov al, byte [0x404492]
mov byte [ecx + 0x12], al
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x108]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x311], al
test al, al
jne 0x402030
lea edi, [ebp - 0x310]
dec edi
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402050
mov ecx, 8
lea eax, [ebp - 0x450]
mov esi, str....._binwin64pscenter_cmd.exe
rep movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x310]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x4020a2
push eax
call ebx
lea edi, [ebp - 0x108]
dec edi
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402090
mov esi, str....._binwin64pscenter_cmd.exe
jmp 0x40213f
lea edi, [ebp - 0x108]
dec edi
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4020b0
jmp 0x40213a
mov al, byte [edx]
inc edx
test al, al
jne 0x4020c0
lea edi, [ebp - 0x8450]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4020d0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x8450]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4020f0
mov eax, dword [str....._binwin32_]
lea edi, [ebp - 0x108]
mov dword [ecx], eax
dec edi
mov eax, dword [0x404484]
mov dword [ecx + 4], eax
mov eax, dword [0x404488]
mov dword [ecx + 8], eax
mov eax, dword [0x40448c]
mov dword [ecx + 0xc], eax
mov ax, word [0x404490]
mov word [ecx + 0x10], ax
mov al, byte [0x404492]
mov byte [ecx + 0x12], al
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402132
mov esi, str....._binwin32pscenter_cmd.exe
mov ecx, 8
lea eax, [ebp - 0x450]
rep movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x108]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x402211
push eax
call ebx
lea eax, [ebp - 0x8450]
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
lea eax, [ebp - 0x10450]
push 0x7fff
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__getcwd]
add esp, 0xc
test eax, eax
jne 0x4021bc
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.Fatal_error:_Not_enough_memory:_n
push 2
call esi
add esp, 4
push eax
call fcn.00401c00
push 2
call esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 0x10
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov ebx, dword [ebp + 8]
lea eax, [ebx*4]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x401d7a
lea eax, [ebp - 0x108]
mov dword [edi], eax
cmp ebx, 1
jle 0x402200
mov esi, dword [ebp + 0xc]
lea ecx, [edi + 4]
sub esi, edi
lea edx, [ebx - 1]
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
sub edx, 1
jne 0x4021f2
push edi
push ebx
call fcn.004015a0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea eax, [ebp - 0x108]
push eax
push str.Fatal_error:_Unable_to_locate_Polyspace_configure_binary_file:_n____s_n
push 2
call esi
add esp, 4
push eax
call fcn.00401c00
push 2
call esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 0x14
jmp 0x401d93