Function at 0x406a00
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5935ce
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xad8
mov eax, dword [0x5de00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0xadc], esi
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov edi, dword [ebx + 0x14]
mov dword [ebp - 0xae0], esi
cmp dword [0x5e4570], 0
mov dword [ebp - 0xad8], eax
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0xad4], edx
mov dword [ebp - 0xae4], eax
jne 0x406a8f
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov edx, dword [ebp - 0xad4]
mov dword [0x5e4570], eax
lea ecx, [esi + 8]
mov dword [esi], vtable.CArchiveFile3.0
mov dword [esi + 4], 0
xorps xmm0, xmm0
movups xmmword [ecx], xmm0
xor eax, eax
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], ax
mov dword [ebp - 4], eax
mov dword [esi + 0x20], eax
mov eax, dword [ebx + 0x18]
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
xor eax, eax
mov dword [ebp - 0x228], 0
movups xmmword [ebp - 0x238], xmm0
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
mov eax, dword [ebp - 0xae4]
mov byte [ebp - 4], 2
test eax, eax
je 0x406b15
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
test edx, edx
je 0x406b41
lea eax, [edx + 2]
mov dword [ebp - 0xadc], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406b22
sub edx, dword [ebp - 0xadc]
sar edx, 1
push edx
push dword [ebp - 0xad4]
call fcn.004039f0
test edi, edi
je 0x406b63
mov ecx, edi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406b50
sub ecx, edx
sar ecx, 1
push ecx
push edi
jmp 0x406ba8
lea eax, [ebp - 0x220]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebx + 0x10], 0
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
je 0x406b91
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406b84
jmp 0x406b9c
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406b91
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x238]
call fcn.004039f0
mov edx, dword [ebp - 0x228]
test edx, edx
je 0x406bf1
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
cmp word [eax + edx*2 - 2], 0x5c
je 0x406bf1
push 1
push 0x5aaa60
lea ecx, [ebp - 0x238]
call fcn.004083e0
mov edx, dword [ebp - 0x228]
cmp dword [ebx + 0x10], 0
je 0x4071c5
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x298]
call fcn.004037a0
mov edi, dword [ebp - 0xad4]
mov byte [ebp - 4], 3
test edi, edi
jne 0x406d09
mov edi, dword [ebp - 0xad8]
mov ecx, edi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406c30
sub ecx, edx
mov eax, SysReAllocString
mov edx, dword [ebp - 0x228]
sub eax, edx
sar ecx, 1
cmp eax, ecx
jb 0x4077ec
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
push ecx
cmovae eax, dword [ebp - 0x238]
push edi
push edx
push eax
push ecx
push dword [ebp - 0xae0]
lea ecx, [ebp - 0x250]
call fcn.00403e90
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x406cbe
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406cb4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4077e6
push ecx
push edx
call fcn.0052d747
add esp, 8
movups xmm0, xmmword [ebp - 0x250]
xor eax, eax
lea ecx, [ebp - 0x250]
mov word [ebp - 0x250], ax
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [ebp - 0x240]
movq qword [ebp - 0x228], xmm0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
call fcn.00403990
jmp 0x4070dc
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406d10
sub ecx, edx
mov eax, SysReAllocString
mov edx, dword [ebp - 0x228]
sub eax, edx
sar ecx, 1
cmp eax, ecx
jb 0x4077f1
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
push ecx
cmovae eax, dword [ebp - 0x238]
push edi
push edx
push eax
push ecx
push dword [ebp - 0xae0]
lea ecx, [ebp - 0x250]
call fcn.00403e90
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x406d9e
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406d94
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4070cc
push ecx
push edx
call fcn.0052d747
add esp, 8
movups xmm0, xmmword [ebp - 0x250]
xor eax, eax
lea ecx, [ebp - 0x250]
mov word [ebp - 0x250], ax
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [ebp - 0x240]
movq qword [ebp - 0x228], xmm0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
call fcn.00403990
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x6ca]
push 0x100
push ecx
push 0x100
lea ecx, [ebp - 0x8ca]
push ecx
push 0x100
lea ecx, [ebp - 0xaca]
push ecx
push 3
lea ecx, [ebp - 0xad0]
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
xorps xmm0, xmm0
mov dword [ebp - 0x258], 0
lea ecx, [ebp - 0xad0]
mov dword [ebp - 0x254], 0
add esp, 0x24
lea edx, [ecx + 2]
movups xmmword [ebp - 0x268], xmm0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406e56
sub ecx, edx
lea eax, [ebp - 0xad0]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x268]
call fcn.00403d10
lea ecx, [ebp - 0xaca]
mov byte [ebp - 4], 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406e85
sub ecx, edx
mov eax, SysReAllocString
mov edx, dword [ebp - 0x258]
sub eax, edx
sar ecx, 1
cmp eax, ecx
jb 0x4077f6
cmp dword [ebp - 0x254], 8
lea eax, [ebp - 0x268]
push ecx
cmovae eax, dword [ebp - 0x268]
lea ecx, [ebp - 0xaca]
push ecx
push edx
push eax
push ecx
push dword [ebp - 0xae0]
lea ecx, [ebp - 0x250]
call fcn.00403e90
lea eax, [ebp - 0x8ca]
mov byte [ebp - 4], 5
push eax
lea edx, [ebp - 0x250]
lea ecx, [ebp - 0x280]
call fcn.00408550
mov edi, eax
add esp, 4
lea eax, [ebp - 0x268]
cmp eax, edi
je 0x406f70
mov ecx, dword [ebp - 0x254]
cmp ecx, 8
jb 0x406f46
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406f3c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406f3c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0052d747
add esp, 8
movups xmm0, xmmword [edi]
xor eax, eax
movups xmmword [ebp - 0x268], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x258], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
lea ecx, [ebp - 0x280]
call fcn.00403990
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 4
call fcn.00403990
mov ecx, dword [ebp - 0x258]
mov eax, SysReAllocString
sub eax, ecx
cmp eax, 1
jb 0x4077fb
cmp dword [ebp - 0x254], 8
lea eax, [ebp - 0x268]
push 1
cmovae eax, dword [ebp - 0x268]
push 0x5aaa60
push ecx
push eax
push ecx
push dword [ebp - 0xae0]
lea ecx, [ebp - 0x250]
call fcn.00403e90
push dword [ebp - 0xad8]
lea edx, [ebp - 0x250]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x280]
call fcn.00408550
mov edi, eax
add esp, 4
lea eax, [ebp - 0x238]
cmp eax, edi
je 0x407080
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x40703f
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x407035
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x407035
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0052d747
add esp, 8
mov dword [ebp - 0x228], 0
xor eax, eax
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x228], xmm0
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
lea ecx, [ebp - 0x280]
call fcn.00403990
lea ecx, [ebp - 0x250]
call fcn.00403990
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x254]
cmp ecx, 8
jb 0x4070dc
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4070d2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4070d2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0052d747
add esp, 8
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x4c8]
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfindfirst64i32]
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
je 0x407180
cmp dword [esi + 0x24], 0
lea eax, [ebp - 0x238]
je 0x407156
cmp dword [ebp - 0x224], 8
push 0
cmovae eax, dword [ebp - 0x238]
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x30], eax
test ecx, ecx
je 0x407177
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407177
cmp dword [ebp - 0x224], 8
push 0x5aaa64
cmovae eax, dword [ebp - 0x238]
push eax
lea eax, [esi + 0x2c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
mov eax, dword [ebp - 0x4a8]
mov dword [esi + 4], eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__findclose]
add esp, 4
lea eax, [ebp - 0x298]
cmp dword [ebp - 0x284], 8
lea ecx, [ebp - 0x238]
cmovae eax, dword [ebp - 0x298]
push dword [ebp - 0x288]
push eax
call fcn.004039f0
lea ecx, [ebp - 0x298]
mov byte [ebp - 4], 2
call fcn.00403990
mov edx, dword [ebp - 0x228]
cmp dword [esi + 0x2c], 0
lea edi, [esi + 0x2c]
jne 0x4077a8
cmp dword [esi + 0x30], 0
jne 0x4077a8
cmp dword [ebp - 0xad4], 0
je 0x407685
cmp dword [0x5df020], 0
jbe 0x4072b6
push 0x5df010
lea ecx, [ebp - 0x250]
call fcn.004037a0
push dword [ebp - 0xad4]
lea edx, [ebp - 0x250]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x280]
call fcn.00403cb0
add esp, 4
lea ecx, [ebp - 0x250]
push eax
call fcn.00403720
lea ecx, [ebp - 0x280]
call fcn.00403990
cmp dword [esi + 0x24], 0
lea eax, [ebp - 0x250]
je 0x407289
cmp dword [ebp - 0x23c], 8
push 0
cmovae eax, dword [ebp - 0x250]
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x30], eax
test ecx, ecx
je 0x4072a7
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4072a7
cmp dword [ebp - 0x23c], 8
push 0x5aaa64
cmovae eax, dword [ebp - 0x250]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 2
call fcn.00403990
cmp dword [edi], 0
jne 0x4074af
cmp dword [esi + 0x30], 0
jne 0x4074af
cmp dword [0x5df084], 8
mov edx, 0x5df070
cmovae edx, dword [0x5df070]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0xadc], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4072e7
sub ecx, dword [ebp - 0xadc]
sar ecx, 1
je 0x4074af
push edx
lea ecx, [ebp - 0x250]
call fcn.00403760
push dword [ebp - 0xad4]
lea edx, [ebp - 0x250]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x280]
call fcn.00403cb0
add esp, 4
lea ecx, [ebp - 0x250]
push eax
call fcn.00403720
lea ecx, [ebp - 0x280]
call fcn.00403990
cmp dword [esi + 0x24], 0
lea eax, [ebp - 0x250]
je 0x40738f
cmp dword [ebp - 0x23c], 8
push 0
cmovae eax, dword [ebp - 0x250]
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x30], eax
test ecx, ecx
je 0x4073ad
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4073ad
cmp dword [ebp - 0x23c], 8
push 0x5aaa64
cmovae eax, dword [ebp - 0x250]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
mov ecx, dword [edi]
test ecx, ecx
jne 0x4073bc
cmp dword [esi + 0x30], ecx
je 0x4074a0
cmp dword [esi + 0x24], 0
lea eax, [ebp - 0x250]
je 0x407468
push dword [ebp - 0xae4]
cmp dword [ebp - 0x23c], 8
lea ecx, [esi + 4]
push ecx
push dword [esi + 0x30]
cmovae eax, dword [ebp - 0x250]
push dword [ebp - 0xad8]
push eax
call fcn.00407ea0
test eax, eax
je 0x4074a0
lea ecx, [ebp - 0x250]
call fcn.00403990
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x407446
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40743c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4075ce
push ecx
push edx
call fcn.0052d747
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0052d3c5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x18
cmp dword [ebp - 0x23c], 8
lea edx, [esi + 4]
push edx
cmovae eax, dword [ebp - 0x250]
push ecx
push dword [ebp - 0xad8]
push eax
call fcn.00407c90
test eax, eax
jne 0x407585
push dword [edi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi], 0
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 2
call fcn.00403990
cmp dword [esi + 0x24], 0
je 0x4075f0
cmp dword [esi + 0x30], 0
mov edi, dword [ebp - 0xad4]
jne 0x407537
push edi
lea edx, [ebp - 0x238]
lea ecx, [ebp - 0x280]
call fcn.00403cb0
add esp, 4
lea ecx, [ebp - 0x238]
push eax
call fcn.00403720
lea ecx, [ebp - 0x280]
call fcn.00403990
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
push 0
cmovae eax, dword [ebp - 0x238]
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [esi + 0x30]
xor edx, edx
cmp eax, 0xffffffff
cmove eax, edx
mov dword [esi + 0x30], eax
test ecx, ecx
je 0x407537
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x4075d4
mov eax, dword [ebp - 0x224]
cmp eax, 8
jb 0x407446
mov edx, dword [ebp - 0x238]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40743c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4077e6
jmp 0x40743c
lea ecx, [ebp - 0x250]
call fcn.00403990
mov ecx, dword [ebp - 0x224]
cmp ecx, 8
jb 0x407446
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40743c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40743c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push dword [ebp - 0xae4]
lea ecx, [esi + 4]
push ecx
push eax
push dword [ebp - 0xad8]
push edi
call fcn.00407ea0
jmp 0x4077a8
cmp dword [edi], 0
jne 0x40764a
push dword [ebp - 0xad4]
lea edx, [ebp - 0x238]
lea ecx, [ebp - 0x280]
call fcn.00403cb0
add esp, 4
lea ecx, [ebp - 0x238]
push eax
call fcn.00403720
lea ecx, [ebp - 0x280]
call fcn.00403990
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
push 0x5aaa64
cmovae eax, dword [ebp - 0x238]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
mov eax, dword [edi]
test eax, eax
je 0x407542
lea ecx, [esi + 4]
push ecx
push eax
push dword [ebp - 0xad8]
push dword [ebp - 0xad4]
call fcn.00407c90
test eax, eax
jne 0x4077a8
push dword [edi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov dword [edi], 0
jmp 0x4077a5
mov ecx, dword [ebp - 0xad8]
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407690
sub ecx, edi
mov eax, SysReAllocString
sar ecx, 1
sub eax, edx
cmp eax, ecx
jb 0x407800
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
push ecx
push dword [ebp - 0xad8]
cmovae eax, dword [ebp - 0x238]
push edx
push eax
push ecx
push dword [ebp - 0xae0]
lea ecx, [ebp - 0x298]
call fcn.00403e90
lea eax, [ebp - 0x298]
push eax
lea ecx, [ebp - 0x238]
call fcn.00403720
lea ecx, [ebp - 0x298]
call fcn.00403990
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x4c8]
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfindfirst64i32]
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
je 0x40779e
cmp dword [esi + 0x24], 0
lea eax, [ebp - 0x238]
je 0x407774
cmp dword [ebp - 0x224], 8
push 0
cmovae eax, dword [ebp - 0x238]
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [esi + 0x30]
xor edx, edx
cmp eax, 0xffffffff
cmove eax, edx
mov dword [esi + 0x30], eax
test ecx, ecx
je 0x407795
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407795
cmp dword [ebp - 0x224], 8
push 0x5aaa64
cmovae eax, dword [ebp - 0x238]
push eax
lea eax, [esi + 0x2c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
mov eax, dword [ebp - 0x4a8]
mov dword [esi + 4], eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__findclose]
add esp, 4
mov eax, dword [ebp - 0x224]
cmp eax, 8
jb 0x407446
mov edx, dword [ebp - 0x238]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40743c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40743c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.00402990
call fcn.00402990
call fcn.00402990
call fcn.00402990
call fcn.00402990
int3