Function at 0x43cc40
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov eax, 0x404c
mov ebp, esp
push edi
push esi
push ebx
call fcn.005d34c0
sub esp, eax
movzx eax, word [0x723a6c]
lea edi, [ebp - 0x4014]
mov dword [ebp - 0x403c], ecx
mov ecx, 0x7ff
mov word [ebp - 0x4018], ax
xor eax, eax
mov word [ebp - 0x4016], ax
xor eax, eax
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea edx, [ebp - 0x4038]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
sub esp, 8
cmp dword [ebp - 0x4038], 1
mov dword [ebp - 0x4048], eax
jbe 0x43ce22
mov esi, 1
mov eax, dword [ebp - 0x4048]
mov ebx, dword [eax + esi*4]
cmp word [ebx], 0x2f
je 0x43cef0
mov dword [esp + 4], str._script
mov dword [esp], ebx
call sub.SHELL32.dll_StrStrIW
sub esp, 8
test eax, eax
je 0x43ce53
add ebx, 0x10
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x4018]
mov dword [esp], ebx
call sub.msvcrt.dll_wcscpy
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
test eax, eax
je 0x43cfcc
movzx eax, word [0x723a6c]
xor ecx, ecx
lea edi, [ebp - 0x2014]
mov word [ebp - 0x2016], cx
mov ecx, 0x7ff
mov word [ebp - 0x2018], ax
xor eax, eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2018]
mov dword [esp], ebx
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [ebp - 0x403c]
sub esp, 0xc
lea ecx, [eax + 0x10]
mov ebx, dword [eax + 0x14]
mov dword [ebp - 0x4040], ecx
mov ecx, dword [eax + 0x10]
cmp ecx, ebx
mov dword [ebp - 0x4044], ecx
mov edi, ecx
je 0x43cd8e
lea esi, [esi]
mov eax, dword [edi]
lea edx, [edi + 8]
cmp eax, edx
je 0x43cd81
mov dword [esp], eax
call fcn.006e9880
add edi, 0x18
cmp ebx, edi
jne 0x43cd70
mov eax, dword [ebp - 0x403c]
mov edx, dword [ebp - 0x4044]
lea ebx, [ebp - 0x4028]
lea edi, [ebp - 0x4030]
mov dword [ebp - 0x4030], ebx
mov dword [eax + 0x14], edx
lea eax, [ebp - 0x2018]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
lea edx, [eax + eax]
mov ecx, edx
sar ecx, 1
cmp ecx, 7
mov dword [ebp - 0x4034], ecx
ja 0x43cf00
cmp ecx, 1
mov eax, dword [ebp - 0x4030]
je 0x43cf60
test ecx, ecx
jne 0x43cf39
xor edx, edx
mov dword [ebp - 0x402c], ecx
mov word [eax + ecx*2], dx
mov ecx, dword [ebp - 0x4040]
mov dword [esp], edi
call fcn.006b6170
mov eax, dword [ebp - 0x4030]
sub esp, 4
cmp eax, ebx
je 0x43ce13
mov dword [esp], eax
call fcn.006e9880
add esi, 1
cmp dword [ebp - 0x4038], esi
ja 0x43ccb2
mov eax, dword [ebp - 0x403c]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov edx, eax
mov dword [ebp - 0x4040], eax
xor eax, eax
sub edx, ecx
sar edx, 3
imul edx, edx, 0xaaaaaaab
test edx, edx
jne 0x43d009
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x403c]
mov eax, dword [ecx + 0x14]
sub eax, dword [ecx + 0x10]
sar eax, 3
imul eax, eax, 0xaaaaaaab
test eax, eax
je 0x43ce13
lea eax, [ebp - 0x2010]
mov dword [esp], ebx
mov dword [ebp - 0x2018], eax
call sub.msvcrt.dll_wcslen
lea edi, [eax + eax]
mov edx, edi
sar edx, 1
cmp edx, 7
mov dword [ebp - 0x4030], edx
ja 0x43cf6f
cmp edx, 1
mov eax, dword [ebp - 0x2018]
je 0x43cfc1
test edx, edx
jne 0x43cfa0
xor ecx, ecx
mov dword [ebp - 0x2014], edx
mov word [eax + edx*2], cx
mov eax, dword [ebp - 0x403c]
lea ecx, [eax + 0x10]
lea eax, [ebp - 0x2018]
mov dword [esp], eax
call fcn.006b6170
mov eax, dword [ebp - 0x2018]
lea ecx, [ebp - 0x2010]
sub esp, 4
cmp eax, ecx
jne 0x43ce0b
jmp 0x43ce13
mov edi, 0x2d
mov word [ebx], di
jmp 0x43ccc5
lea eax, [ebp - 0x4034]
mov ecx, edi
mov dword [esp + 4], 0
mov dword [ebp - 0x4044], edx
mov dword [esp], eax
call fcn.006c0420
mov ecx, dword [ebp - 0x4034]
mov edx, dword [ebp - 0x4044]
sub esp, 8
mov dword [ebp - 0x4030], eax
mov dword [ebp - 0x4028], ecx
mov dword [esp + 8], edx
lea edx, [ebp - 0x2018]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0x4034]
mov eax, dword [ebp - 0x4030]
jmp 0x43cde4
movzx edx, word [ebp - 0x2018]
mov word [eax], dx
jmp 0x43cde4
lea eax, [ebp - 0x4030]
lea ecx, [ebp - 0x2018]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x4030]
sub esp, 8
mov dword [ebp - 0x2018], eax
mov dword [ebp - 0x2010], edx
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x4030]
mov eax, dword [ebp - 0x2018]
jmp 0x43cead
movzx ecx, word [ebx]
mov word [eax], cx
jmp 0x43cead
mov dword [esp + 8], 0x1f
mov dword [esp + 4], str.Command_line_argument_missing._n
mov dword [esp], 0x718820
call fcn.006dd910
mov dword [esp + 8], 0x1c
mov dword [esp + 4], str.Usage:_SDI__script:file.txt_n
mov dword [esp], 0x718820
call fcn.006dd910
jmp 0x43ce22
mov dword [esp + 4], 0x723a42
mov eax, dword [ecx]
lea ebx, [ebp - 0x4018]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov esi, eax
je 0x43d340
lea esi, [esi]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1000
mov dword [esp], ebx
call sub.msvcrt.dll_fgetws
test eax, eax
je 0x43d21d
mov edi, ebx
jmp 0x43d053
add edi, 2
movzx eax, word [edi]
mov dword [esp], eax
call sub.msvcrt.dll_iswspace
test eax, eax
jne 0x43d050
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.msvcrt.dll_wcscpy
movzx eax, word [ebp - 0x4018]
cmp ax, 0x23
je 0x43d030
cmp ax, 0x3b
je 0x43d030
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
test eax, eax
je 0x43d030
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
cmp word [ebp + eax*2 - 0x401a], 0xa
je 0x43d2df
lea eax, [ebp - 0x2010]
mov dword [esp], ebx
mov dword [ebp - 0x2018], eax
call sub.msvcrt.dll_wcslen
lea edi, [eax + eax]
mov edx, edi
sar edx, 1
cmp edx, 7
mov dword [ebp - 0x4030], edx
ja 0x43d1cb
cmp edx, 1
mov eax, dword [ebp - 0x2018]
je 0x43d257
test edx, edx
jne 0x43d1fc
xor ecx, ecx
mov edi, dword [ebp - 0x403c]
mov dword [ebp - 0x2014], edx
mov word [eax + edx*2], cx
lea eax, [ebp - 0x2018]
mov ecx, edi
mov dword [esp], eax
call fcn.00439f90
mov eax, edi
sub esp, 4
mov edi, dword [edi + 8]
cmp edi, dword [eax + 0xc]
je 0x43d232
test edi, edi
je 0x43d2ca
lea eax, [edi + 8]
mov ecx, dword [ebp - 0x2014]
mov dword [ebp - 0x4048], eax
mov dword [edi], eax
mov eax, dword [ebp - 0x2018]
add ecx, ecx
mov dword [ebp - 0x4044], ecx
mov edx, eax
mov dword [ebp - 0x4040], eax
add eax, ecx
je 0x43d15b
test edx, edx
jne 0x43d15b
mov dword [esp], 0x72301c
call fcn.006de350
mov eax, dword [ebp - 0x4044]
sar eax, 1
cmp eax, 7
mov dword [ebp - 0x4030], eax
ja 0x43d266
cmp eax, 1
je 0x43d2f6
test eax, eax
jne 0x43d3ba
mov edx, dword [ebp - 0x4040]
mov ecx, dword [ebp - 0x4048]
mov dword [ebp - 0x4044], edi
mov dword [edi + 4], eax
xor edi, edi
mov word [ecx + eax*2], di
mov eax, dword [ebp - 0x4044]
mov ecx, dword [ebp - 0x403c]
add eax, 0x18
mov dword [ecx + 8], eax
lea eax, [ebp - 0x2010]
cmp edx, eax
je 0x43d030
mov dword [esp], edx
call fcn.006e9880
jmp 0x43d030
lea eax, [ebp - 0x4030]
lea ecx, [ebp - 0x2018]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x4030]
sub esp, 8
mov dword [ebp - 0x2018], eax
mov dword [ebp - 0x2010], edx
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x4030]
mov eax, dword [ebp - 0x2018]
jmp 0x43d0e5
mov dword [esp], esi
call sub.msvcrt.dll_fclose
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x403c]
lea ecx, [eax + 4]
lea eax, [ebp - 0x2018]
mov dword [esp], eax
call fcn.006b63e0
sub esp, 4
mov edx, dword [ebp - 0x2018]
jmp 0x43d1b0
movzx ecx, word [ebp - 0x4018]
mov word [eax], cx
jmp 0x43d0e5
lea eax, [ebp - 0x4030]
mov dword [esp + 4], 0
mov ecx, edi
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x4030]
sub esp, 8
mov dword [edi], eax
mov dword [edi + 8], edx
mov edx, dword [ebp - 0x4044]
mov dword [esp], eax
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x4040]
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x403c]
mov eax, dword [ebp - 0x4030]
mov ecx, dword [edi]
mov edx, dword [edx + 8]
mov dword [ebp - 0x4044], edx
mov edx, dword [ebp - 0x2018]
jmp 0x43d195
mov edx, dword [ebp - 0x2018]
mov dword [ebp - 0x4044], 0
jmp 0x43d19e
mov dword [esp], ebx
xor edi, edi
call sub.msvcrt.dll_wcslen
mov word [ebp + eax*2 - 0x401a], di
jmp 0x43d0a4
mov ecx, dword [ebp - 0x4040]
mov dword [ebp - 0x4044], edi
movzx ecx, word [ecx]
mov word [edi + 8], cx
mov ecx, dword [ebp - 0x4048]
jmp 0x43d195
mov eax, dword [ebp - 0x403c]
mov eax, dword [eax + 0x10]
mov ebx, dword [eax]
mov dword [esp], 0x723a48
call sub.msvcrt.dll_wcslen
mov dword [esp + 4], 0x723a48
mov dword [esp + 8], eax
mov dword [esp], 0x718aa0
call fcn.006ddca0
test ebx, ebx
je 0x43d3c5
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], 0x718aa0
call fcn.006ddca0
mov dword [esp], 0x723a68
call sub.msvcrt.dll_wcslen
mov dword [esp + 4], 0x723a68
mov dword [esp + 8], eax
mov dword [esp], 0x718aa0
call fcn.006ddca0
xor eax, eax
jmp 0x43ce4b
mov eax, dword [ebp - 0x4048]
jmp 0x43d28c
mov eax, dword [0x718aa0]
mov ecx, dword [eax - 0xc]
add ecx, 0x718aa0
mov eax, dword [ecx + 0x14]
or eax, 1
mov dword [esp], eax
call fcn.006d6ba0
sub esp, 4
jmp 0x43d38f