Function at 0x407730
Capabilities:
Access peb ldr_data
Get common file path
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4e071e
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x50f130]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x50f130]
xor eax, esp
push eax
lea eax, [esp + 0x230]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x238], ebx
mov eax, dword [esp + 0x240]
add eax, 0xfffffff0
call fcn.004012e0
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x238], 1
mov eax, dword [0x5143cc]
mov edx, dword [eax + 0xc]
mov ecx, 0x5143cc
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x206
lea eax, [esp + 0x2a]
push ebx
mov byte [esp + 0x240], 2
push eax
mov word [esp + 0x30], bx
call fcn.004be240
add esp, 0xc
lea edi, [esp + 0x240]
call fcn.00408100
mov ebp, dword [esp + 0x240]
mov eax, dword [ebp - 0xc]
cmp eax, ebx
jl 0x407833
push str._APPDATA_ALL_USER_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x407833
sub eax, ebp
sar eax, 1
js 0x407833
push str._APPDATA_ALL_USER_
mov ebx, 0x12
lea eax, [esp + 0x18]
call fcn.00401470
push 0x104
lea ecx, [esp + 0x28]
push ecx
push str._ALLUSERSPROFILE_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ebx, ebx
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._APPDATA_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x40787c
sub eax, ebp
sar eax, 1
js 0x40787c
mov edx, str._APPDATA_
lea edi, [esp + 0x14]
call fcn.00404a50
push 0x104
lea edx, [esp + 0x28]
push edx
push str._APPDATA_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._TEMP_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x4078c5
sub eax, ebp
sar eax, 1
js 0x4078c5
mov edx, str._TEMP_
lea edi, [esp + 0x14]
call fcn.00404a50
push 0x104
lea eax, [esp + 0x28]
push eax
push str._TEMP_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._SYSTEM_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x407909
sub eax, ebp
sar eax, 1
js 0x407909
mov edx, str._SYSTEM_
lea edi, [esp + 0x14]
call fcn.00404a50
push 0x104
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._WINDOWS_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x40794d
sub eax, ebp
sar eax, 1
js 0x40794d
mov edx, str._WINDOWS_
lea edi, [esp + 0x14]
call fcn.00404a50
push 0x104
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._QQ_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x407995
sub eax, ebp
sar eax, 1
js 0x407995
mov edx, str._QQ_
lea edi, [esp + 0x14]
call fcn.00404a50
lea ebx, [esp + 0x24]
call fcn.00407b80
mov eax, ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
xor ebx, ebx
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._CUR_MODULE_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x407a07
sub eax, ebp
sar eax, 1
js 0x407a07
mov edx, str._CUR_MODULE_
lea edi, [esp + 0x14]
call fcn.00404a50
mov edi, dword [0x5143ec]
lea esi, [esp + 0x18]
call fcn.004215d0
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push ecx
lea edx, [esp + 0x2c]
push 0x104
push edx
call fcn.004b9b37
add esp, 0x10
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, esi
call fcn.004016d0
mov esi, dword [esp + 0x1c]
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._CUR_EXE_MODULE_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x407a50
sub eax, ebp
sar eax, 1
js 0x407a50
mov edx, str._CUR_EXE_MODULE_
lea edi, [esp + 0x14]
call fcn.00404a50
push 0x104
lea ecx, [esp + 0x28]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
jmp 0x407a8b
cmp dword [ebp - 0xc], ebx
jl 0x407a8b
push str._CUR_DIR_
push ebp
call fcn.004b9ad9
add esp, 8
cmp eax, ebx
je 0x407a8b
sub eax, ebp
sar eax, 1
js 0x407a8b
mov edx, str._CUR_DIR_
lea edi, [esp + 0x14]
call fcn.00404a50
lea eax, [esp + 0x24]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, dword [esp + 0x14]
cmp dword [edi - 0xc], ebx
je 0x407acb
lea eax, [esp + 0x24]
lea edx, [eax + 2]
jmp 0x407aa0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407aa0
sub eax, edx
sar eax, 1
je 0x407acb
lea ecx, [esp + 0x24]
push ecx
push edi
lea edx, [esp + 0x248]
push edx
call fcn.00407ee0
mov ebp, dword [esp + 0x240]
add ebp, 0xfffffff0
mov eax, ebp
call fcn.004012e0
add eax, 0x10
mov dword [esi], eax
lea eax, [edi - 0x10]
mov byte [esp + 0x238], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407afe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x238], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b25
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x238], 0xffffffff
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b4a
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov eax, esi
mov ecx, dword [esp + 0x230]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.004b83ee
add esp, 0x228
ret 4