Function at 0x481390
Capabilities:
Access peb ldr_data
Get kernel32 base address
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4c1000
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
mov eax, dword [0x50fcb0]
push ebx
push ebp
xor ebp, ebp
push esi
mov dword [esp + 0x18], ebp
mov dword [esp + 0xc], eax
mov ebx, dword [esp + 0x30]
mov ecx, dword [ebx]
mov eax, dword [ecx - 8]
push eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x28], ebp
call fcn.00472150
mov eax, dword [ebx]
mov edx, dword [eax - 8]
xor esi, esi
cmp edx, ebp
jbe 0x481583
push edi
mov cl, byte [eax + esi]
cmp cl, 0x24
jl 0x481407
cmp cl, 0x25
jle 0x48141d
cmp cl, 0x5c
jne 0x481407
dec edx
cmp esi, edx
je 0x481407
mov cl, byte [eax + esi + 1]
cmp cl, 0x25
je 0x481406
cmp cl, 0x24
jne 0x481407
inc esi
xor edx, edx
mov dl, byte [eax + esi]
lea ecx, [esp + 0x10]
push edx
push 1
call fcn.00472d10
jmp 0x481574
cmp byte [eax + esi], 0x25
jne 0x48142d
mov dword [esp + 0x34], 0x25
jmp 0x481462
mov ecx, dword [eax - 8]
dec ecx
cmp esi, ecx
jne 0x48143b
mov dword [esp + 0x34], ebp
jmp 0x481462
mov cl, byte [eax + esi + 1]
cmp cl, 0x28
je 0x481459
cmp cl, 0x7b
je 0x48144f
mov dword [esp + 0x34], ebp
jmp 0x481462
mov dword [esp + 0x34], 0x7d
jmp 0x481461
mov dword [esp + 0x34], 0x29
inc esi
mov ecx, dword [eax - 8]
lea edi, [esi + 1]
cmp edi, ecx
jae 0x481494
lea esp, [esp]
movsx eax, byte [eax + edi]
push eax
call dword [sym.imp.MSVCR71.dll_isalnum]
add esp, 4
test eax, eax
jne 0x48148a
mov eax, dword [ebx]
cmp byte [eax + edi], 0x5f
jne 0x481494
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
inc edi
cmp edi, ecx
jb 0x481470
mov eax, dword [ebx]
mov ecx, edi
sub ecx, esi
dec ecx
push ecx
push ebp
lea edx, [eax + esi + 1]
push edx
lea ecx, [esp + 0x20]
call fcn.00472c90
mov eax, dword [esp + 0x14]
push eax
mov byte [esp + 0x2c], 1
call dword [sym.imp.MSVCR71.dll_getenv]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4814d4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4814c7
sub eax, edx
push eax
push ebp
jmp 0x48151d
mov eax, dword [esp + 0x34]
cmp eax, 0x25
je 0x4814fb
test eax, eax
je 0x4814fb
mov eax, dword [ebx]
mov cl, byte [eax + esi - 1]
mov byte [esp + 0x18], cl
mov edx, dword [esp + 0x18]
push edx
push 1
lea ecx, [esp + 0x18]
call fcn.00472d10
mov eax, dword [ebx]
mov al, byte [eax + esi]
mov byte [esp + 0x1c], al
mov ecx, dword [esp + 0x1c]
push ecx
push 1
lea ecx, [esp + 0x18]
call fcn.00472d10
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 8]
push eax
push ecx
lea ecx, [esp + 0x18]
push eax
call fcn.00472de0
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x48154c
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
je 0x48154c
cmp byte [eax + edi], cl
jne 0x48154c
test ebp, ebp
jne 0x48154b
push ecx
push 1
lea ecx, [esp + 0x18]
call fcn.00472d10
inc edi
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 0xc]
add eax, 0xfffffff4
cmp ecx, 0xffffffff
lea esi, [edi - 1]
mov byte [esp + 0x28], 0
je 0x481572
dec ecx
mov dword [eax], ecx
jne 0x481572
push eax
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
xor ebp, ebp
mov eax, dword [ebx]
mov edx, dword [eax - 8]
inc esi
cmp esi, edx
jb 0x4813e1
pop edi
mov eax, dword [esp + 0xc]
cmp dword [eax - 8], ebp
mov esi, dword [esp + 0x2c]
jne 0x48159a
mov ecx, dword [0x50fcb0]
mov dword [esi], ecx
jmp 0x4815ac
mov dword [esi], eax
mov ecx, dword [eax - 0xc]
cmp ecx, 0xffffffff
je 0x4815ac
inc ecx
mov dword [eax - 0xc], ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 0xc]
add eax, 0xfffffff4
cmp ecx, 0xffffffff
je 0x4815c8
dec ecx
cmp ecx, ebp
mov dword [eax], ecx
jne 0x4815c8
push eax
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret