Function at 0x5f3f00
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 0x18
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x24], ebx
cmp dword [str.BMSROOT], ebx
je 0x5f4122
mov dword [esp + 0x1c], str.BMSROOT
xor esi, esi
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
mov ecx, dword [eax]
mov eax, edi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x5f3f50
test dl, dl
je 0x5f3f4c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x5f3f50
add eax, 2
add ecx, 2
test dl, dl
jne 0x5f3f30
xor eax, eax
jmp 0x5f3f55
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x5f40fd
mov eax, dword [esi + 0x6852e0]
lea ebp, [esi + 0x6852e0]
mov dword [esp + 0x20], ebp
test eax, eax
je 0x5f3f78
mov ebx, eax
jmp 0x5f40f5
cmp dword [esi + 0x6852e4], 0
jne 0x5f3fa6
push edi
call dword [sym.imp.MSVCR90.dll_getenv]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5f3fa6
push ebx
mov eax, ebp
call fcn.005f3e90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x5f4353
mov eax, dword [esi + 0x6852dc]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5f3fb0
sub eax, edx
add eax, 0x10
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ecx, dword [str.SoftwareZUKEN_]
mov ebp, eax
mov dword [ebp], ecx
mov edx, dword [0x6467c0]
mov dword [ebp + 4], edx
mov eax, dword [0x6467c4]
mov dword [ebp + 8], eax
mov ecx, dword [0x6467c8]
mov dword [ebp + 0xc], ecx
mov eax, dword [esi + 0x6852dc]
add esp, 4
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x5f3ff2
mov edi, ebp
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x5f4000
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
mov ecx, eax
push ebp
and ecx, 3
push closesocket
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5f40e8
mov esi, dword [esp + 0x1c]
mov edx, dword [esi]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0
push edx
push eax
call edi
test eax, eax
jne 0x5f40dd
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x5f406e
cmp eax, 2
jne 0x5f40dd
mov ecx, dword [esp + 0x18]
push ecx
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ecx, dword [esi]
add esp, 4
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
mov ebx, eax
push ebx
lea eax, [esp + 0x18]
push eax
push 0
push ecx
push edx
call edi
test eax, eax
jne 0x5f40d2
cmp dword [esp + 0x10], 2
jne 0x5f40ca
mov edi, dword [esp + 0x20]
push ebx
mov eax, edi
mov esi, ebx
call fcn.005f3e90
push esi
mov ebx, eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 8
test ebx, ebx
je 0x5f40dd
push ebx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [edi], eax
jmp 0x5f40dd
mov eax, dword [esp + 0x20]
mov dword [eax], ebx
jmp 0x5f40dd
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
xor ebx, ebx
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov edi, dword [esp + 0x30]
add esp, 4
test ebx, ebx
jne 0x5f4353
mov esi, dword [esp + 0x24]
inc esi
mov dword [esp + 0x24], esi
shl esi, 4
cmp dword [esi + 0x6852d8], 0
lea eax, [esi + 0x6852d8]
mov dword [esp + 0x1c], eax
jne 0x5f3f23
jmp 0x5f4126
mov edi, dword [esp + 0x2c]
push edi
call dword [sym.imp.MSVCR90.dll_getenv]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5f41a0
mov eax, dword [0x6a01a8]
test eax, eax
je 0x5f4152
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [0x6a01a8], 0
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 2
lea edx, [esp + 0x30]
push edx
push ebx
call edi
mov esi, eax
test esi, esi
jbe 0x5f4194
lea eax, [esi + 1]
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
add esp, 4
push esi
push eax
push ebx
mov dword [0x6a01a8], eax
call edi
xor ecx, ecx
cmp ecx, eax
pop edi
sbb ebx, ebx
and ebx, dword [0x6a01a8]
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x18
ret
pop edi
pop esi
xor ebx, ebx
pop ebp
mov eax, ebx
pop ebx
add esp, 0x18
ret
push 0x5c
push edi
call dword [sym.imp.MSVCR90.dll_strrchr]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x5f421c
push 0x10
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov edx, dword [str.SoftwareZUKEN_]
mov esi, eax
mov dword [esi], edx
mov eax, dword [0x6467c0]
mov dword [esi + 4], eax
mov ecx, dword [0x6467c4]
mov dword [esi + 8], ecx
mov edx, dword [0x6467c8]
mov dword [esi + 0xc], edx
mov eax, edi
add esp, 4
mov byte [esi + 0xf], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5f41f0
sub eax, edx
inc eax
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ebp, eax
mov edx, ebp
add esp, 4
mov eax, edi
sub edx, edi
jmp 0x5f4210
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x5f4210
jmp 0x5f428c
mov edi, ebp
sub edi, dword [esp + 0x2c]
lea eax, [edi + 0x10]
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ecx, dword [str.SoftwareZUKEN_]
mov esi, eax
mov dword [esi], ecx
mov edx, dword [0x6467c0]
mov dword [esi + 4], edx
mov eax, dword [0x6467c4]
mov edx, dword [esp + 0x30]
push edi
mov dword [esi + 8], eax
mov ecx, dword [0x6467c8]
push edx
push esi
mov dword [esi + 0xc], ecx
call dword [sym.imp.MSVCR90.dll_strncat]
lea edi, [ebp + 1]
mov eax, edi
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5f4267
sub eax, edx
inc eax
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ebp, eax
mov edx, ebp
add esp, 4
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x5f4282
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push esi
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5f4344
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0x18]
push edx
push eax
mov eax, dword [esp + 0x24]
push ebp
push eax
call edi
test eax, eax
jne 0x5f4339
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x5f42d8
cmp eax, 2
jne 0x5f4339
mov ecx, dword [esp + 0x18]
push ecx
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ecx, dword [esp + 0x18]
add esp, 4
lea edx, [esp + 0x18]
push edx
mov ebx, eax
push ebx
lea eax, [esp + 0x18]
push eax
push 0
push ebp
push ecx
call edi
test eax, eax
je 0x5f430d
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
xor ebx, ebx
jmp 0x5f4339
cmp dword [esp + 0x10], 2
jne 0x5f4339
push ebx
xor eax, eax
mov edi, ebx
call fcn.005f3e90
push edi
mov ebx, eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 8
test ebx, ebx
je 0x5f4339
push ebx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov ebx, eax
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 8
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x18
ret