Function at 0x79bf27a0
Capabilities:
Check if file exists
Get file attributes
Print debug messages
Query environment variable

Disassembly:
sub esp, 0x24
push ebx
mov bl, byte [esp + 0x34]
push ebp
push esi
push edi
mov dword [esp + 0x40], 0x79bf2fb8
test bl, bl
jne 0x79bf27bf
mov dword [esp + 0x40], 0x79bf2fa0
mov eax, dword [esp + 0x40]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x79bf27c6
sub eax, edx
sar eax, 1
mov edx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], 0x79bf2f84
test bl, bl
jne 0x79bf27ef
mov dword [esp + 0x10], 0x79bf2f68
mov eax, dword [esp + 0x10]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x79bf27f6
sub eax, esi
sar eax, 1
mov dword [esp + 0x1c], eax
mov ecx, edx
cmp edx, eax
jae 0x79bf2811
mov ecx, eax
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov eax, 0x102
sub eax, ecx
xor edi, edi
lea ebx, [eax + 1]
mov dword [esp + 0x2c], 0x79bf2f54
mov dword [esp + 0x30], 0x79bf2f38
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], ebx
lea ecx, [ecx]
mov eax, dword [esp + edi*4 + 0x2c]
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x79bf2921
cmp eax, ebx
jae 0x79bf2921
test edi, edi
jne 0x79bf287d
push 0x5c
push esi
call fcn.79bf1095
add esp, 8
test eax, eax
je 0x79bf2921
sub eax, esi
add eax, 2
sar eax, 1
jmp 0x79bf28ac
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x79bf2882
sub eax, edx
sar eax, 1
movzx ecx, word [esi + eax*2 - 2]
cmp cx, 0x5c
je 0x79bf28ac
cmp cx, 0x2f
je 0x79bf28ac
mov ecx, 0x5c
mov word [esi + eax*2], cx
inc eax
lea edi, [eax + eax]
push edi
push esi
push ebp
call section..text
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x4c]
lea eax, [edx + edx + 2]
push eax
push ecx
lea edx, [edi + esi]
push edx
call section..text
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x28]
lea ecx, [eax + eax + 2]
push ecx
push edx
add edi, ebp
push edi
call section..text
add esp, 0x24
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ebp
xor edi, edi
mov ebx, dword [esp + edi*4 + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x79bf2906
xor eax, eax
mov word [ebx], ax
inc edi
cmp edi, 2
jb 0x79bf28f1
cmp word [esi], 0
jne 0x79bf2942
cmp word [ebp], 0
jne 0x79bf2942
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
inc edi
mov dword [esp + 0x14], edi
cmp edi, 2
jb 0x79bf2840
xor edx, edx
pop edi
mov word [esi], dx
xor eax, eax
pop esi
mov word [ebp], ax
pop ebp
pop ebx
add esp, 0x24
ret
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
xor ebx, ebx
lea ebx, [ebx]
mov esi, dword [esp + ebx*4 + 0x24]
cmp word [esi], 0
je 0x79bf29b6
push 2
push 0
push esi
call ebp
test eax, eax
jne 0x79bf296c
xor ecx, ecx
mov word [esi], cx
jmp 0x79bf29b6
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
lea edx, [eax + 2]
jmp 0x79bf2980
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x79bf2980
sub eax, edx
sar eax, 1
mov edi, eax
cmp edi, 0x102
ja 0x79bf29a9
mov edx, 0xa
xor eax, eax
mov word [esi + edi*2], dx
mov word [esi + edi*2 + 2], ax
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor ecx, ecx
mov word [esi + edi*2], cx
inc ebx
cmp ebx, 2
jb 0x79bf2950
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret