Function at 0x40374f
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x7b0]
sub esp, 0x830
mov eax, dword [0x412384]
xor eax, ebp
mov dword [ebp + 0x7ac], eax
push ebx
xor ebx, ebx
cmp byte [0x413924], bl
jne 0x403a16
push 0x40e
lea eax, [ebp - 0x76]
push ebx
push eax
mov byte [0x413924], 1
mov word [ebp - 0x78], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
push 0x1a
push ebx
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4037cf
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x4037cb
cmp dword [ebp - 0x7c], ebx
je 0x4037cf
push dword [ebp - 0x7c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x4037cf
mov word [ebp - 0x78], bx
push esi
push edi
lea edi, [ebp - 0x78]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4037d6
mov esi, 0x40e618
movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x78]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4037ec
mov esi, 0x40e61c
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x78]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403814
mov word [ebp - 0x78], bx
push 0x410
lea eax, [ebp + 0x39a]
push ebx
push eax
mov word [ebp + 0x398], bx
call sub.MSVCR80.dll_memset
lea eax, [ebp - 0x78]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x403836
sub eax, edx
sar eax, 1
jne 0x403966
mov eax, dword [0x413920]
cmp eax, ebx
jne 0x40385a
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x411
lea ecx, [ebp + 0x398]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0x412
jae 0x403966
cmp eax, ebx
je 0x403966
mov esi, dword [sym.imp.MSVCR80.dll_wcsrchr]
mov word [ebp + eax*2 + 0x398], bx
lea eax, [ebp + 0x398]
push 0x5c
push eax
call esi
cmp eax, ebx
pop ecx
pop ecx
jne 0x4038b0
lea eax, [ebp + 0x398]
push 0x2f
push eax
call esi
cmp eax, ebx
pop ecx
pop ecx
je 0x4038b4
mov word [eax + 2], bx
lea edi, [ebp + 0x398]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4038bc
mov esi, 0x40e618
movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x398]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4038d5
mov esi, str.config
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp + 0x398]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403956
lea edi, [ebp + 0x398]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x403904
mov esi, 0x40e618
movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x398]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x40391d
push 5
pop ecx
push ebx
mov esi, str.HaoZip.hzv
push 0x80
rep movsd dword es:[edi], dword [esi]
push 4
push ebx
push 7
push 0xc0000000
lea eax, [ebp + 0x398]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40395f
mov word [ebp + 0x398], bx
jmp 0x403966
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp + 0x398]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x40396f
sub eax, edx
sar eax, 1
jne 0x4039e9
push 0x207
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp + 0x398]
push eax
call dword [sym.imp.MSVCR80.dll_wcsncpy]
lea eax, [ebp + 0x398]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x4039a1
sub eax, edx
sar eax, 1
je 0x4039e9
lea edi, [ebp + 0x398]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4039b9
mov esi, 0x40e618
movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x398]
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
cmp ax, bx
jne 0x4039d2
push 5
pop ecx
mov esi, str.HaoZip.hzv
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.004063e0
lea edx, [ebp + 0x398]
lea edi, [edx + 2]
mov si, word [edx]
inc edx
inc edx
cmp si, bx
jne 0x4039f7
sub edx, edi
sar edx, 1
pop edi
pop esi
je 0x403a16
lea ebx, [ebp + 0x398]
mov ecx, eax
call fcn.004064b0
mov ecx, dword [ebp + 0x7ac]
xor ecx, ebp
pop ebx
call fcn.0040bac6
add ebp, 0x7b0
leave
ret