Function at 0x102e2df
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x104e070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 0x18]
push 0x58
pop ebx
mov dword [ebp - 0x20c], eax
xor eax, eax
push ebx
push eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x270]
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x248], 0
xor eax, eax
mov word [esi], ax
mov eax, dword [0x104e138]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp + 0x1c]
add esp, 0xc
neg eax
sbb eax, eax
and eax, 0x1000
mov dword [ebp - 0x26c], edi
or eax, 4
xor edi, edi
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x254], esi
mov dword [ebp - 0x258], 1
mov dword [ebp - 0x23c], eax
mov ebx, 0x208
mov esi, 0x104
cmp dword [0x104e06c], edi
je 0x102e41b
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x218], eax
cmp eax, edi
jne 0x102e3d4
mov edi, 0x8007000e
push edi
push 0xea
push 0x10085c0
push 0x100189c
push 1
call fcn.01014247
add esp, 0x14
jmp 0x102e699
push esi
push eax
push 0x10085a4
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x102e409
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x102e3f9
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
test edi, edi
jge 0x102e407
push edi
push 0xed
jmp 0x102e3bb
xor edi, edi
mov eax, dword [ebp - 0x218]
mov dword [ebp - 0x244], eax
mov dword [0x104e06c], edi
cmp dword [ebp - 0x214], edi
je 0x102e600
cmp dword [ebp - 0x20c], edi
je 0x102e600
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x208], eax
cmp eax, edi
jne 0x102e473
mov edi, 0x8007000e
push edi
push 0xf4
push 0x10085c0
push 0x100189c
push 1
call fcn.01014247
mov ebx, dword [ebp - 0x208]
jmp 0x102e682
push ebx
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x210], eax
cmp eax, edi
jne 0x102e4a4
mov edi, 0x8007000e
push edi
push 0xf7
jmp 0x102e457
push dword [ebp - 0x20c]
push dword [ebp - 0x214]
push 0x1008594
push esi
push dword [ebp - 0x208]
call fcn.0100dd8e
mov edi, eax
add esp, 0x14
test edi, edi
jge 0x102e4d2
push edi
push 0xff
jmp 0x102e457
mov ebx, dword [ebp - 0x208]
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x102e4dd
push 0x10027a4
sub eax, edx
push esi
sar eax, 1
push ebx
mov dword [ebp - 0x214], eax
call fcn.01014151
mov edi, eax
test edi, edi
jge 0x102e50e
push edi
push 0x107
jmp 0x102e671
push dword [ebp - 0x20c]
push esi
push ebx
call fcn.01014151
mov edi, eax
test edi, edi
jge 0x102e52c
push edi
push 0x10a
jmp 0x102e671
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x102e531
push 0x10027a4
sub eax, edx
push esi
sar eax, 1
push ebx
mov dword [ebp - 0x20c], eax
call fcn.01014151
mov edi, eax
test edi, edi
jge 0x102e562
push edi
push 0x112
jmp 0x102e671
push esi
push dword [ebp - 0x210]
push 0x87
call fcn.010301ce
mov edi, eax
test edi, edi
jge 0x102e584
push edi
push 0x115
jmp 0x102e671
push dword [ebp - 0x210]
push esi
push ebx
call fcn.01014151
mov edi, eax
test edi, edi
jge 0x102e5a2
push edi
push 0x118
jmp 0x102e671
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x102e5a7
push 0x1008588
sub eax, edx
push esi
sar eax, 1
push ebx
mov dword [ebp - 0x208], eax
call fcn.01014151
mov edi, eax
test edi, edi
jge 0x102e5d8
push edi
push 0x120
jmp 0x102e671
mov ecx, dword [ebp - 0x214]
xor eax, eax
mov word [ebx + ecx*2], ax
mov ecx, dword [ebp - 0x20c]
mov word [ebx + ecx*2], ax
mov ecx, dword [ebp - 0x208]
mov word [ebx + ecx*2], ax
mov dword [ebp - 0x264], ebx
jmp 0x102e606
mov ebx, dword [ebp - 0x208]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x250], eax
xor eax, eax
mov word [ebp - 0x204], ax
push 0x100
lea eax, [ebp - 0x204]
push eax
push 0xfc
call fcn.010301ce
mov edi, eax
test edi, edi
jge 0x102e63c
push edi
push 0x136
jmp 0x102e671
lea eax, [ebp - 0x204]
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
jne 0x102e685
xor edi, edi
inc edi
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
je 0x102e685
mov edi, 0x80004005
push edi
push 0x141
push 0x10085c0
push 0x100189c
push 1
call fcn.01014247
add esp, 0x14
test ebx, ebx
je 0x102e699
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
cmp dword [ebp - 0x218], esi
je 0x102e6b7
push dword [ebp - 0x218]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x210], esi
je 0x102e6d3
push dword [ebp - 0x210]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01036539
leave
ret 0x18