Function at 0x401390
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x41d946
mov eax, dword fs:[0]
push eax
sub esp, 0x31c
mov eax, dword [0x427178]
xor eax, esp
mov dword [esp + 0x314], eax
push esi
push edi
mov eax, dword [0x427178]
xor eax, esp
push eax
lea eax, [esp + 0x328]
mov dword fs:[0], eax
mov dword [esp + 0x10], ecx
mov esi, dword [ebp + 8]
or eax, 0xffffffff
push 0xfffffffffffffffa
push esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
lea eax, [esp + 0x54]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
push 0
lea eax, [esp + 0x68]
push eax
push 0
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov eax, dword [esp + 0x60]
sub eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x64]
push 1
push eax
mov eax, dword [esp + 0x64]
sub eax, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x7c]
sub eax, dword [esp + 0x74]
sub eax, dword [esp + 0x6c]
add eax, dword [esp + 0x64]
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x7c]
sub eax, ecx
sub eax, dword [esp + 0x6c]
add eax, dword [esp + 0x64]
cdq
sub eax, edx
sar eax, 1
add eax, ecx
push eax
push esi
call dword [sym.imp.USER32.dll_MoveWindow]
push 0x3f2
push esi
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0
mov esi, eax
push 0x14b
push esi
mov dword [esp + 0x2c], esi
call dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
mov edi, 0x1f5
push 0x206
push eax
mov word [esp + 0x11c], ax
lea eax, [esp + 0x11e]
push eax
call fcn.00418440
add esp, 0xc
lea eax, [esp + 0x114]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov word [esp + 0x31a], ax
lea eax, [esp + 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.CNS2_
lea eax, [esp + 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ecx]
lea eax, [edi + 0x64]
cmp eax, 0x27b
jge 0x401848
xor eax, eax
lea edx, [esp + 0x8c]
mov word [esp + 0x8c], ax
mov dword [esp + 0x8e], eax
mov word [esp + 0x92], ax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push ecx
mov ecx, edi
call fcn.00406ab0
add esp, 8
test eax, eax
je 0x40183b
lea eax, [esp + 0x114]
push 0x104
push eax
call fcn.0040f984
add esp, 8
mov dword [esp + 0x50], 7
xor ecx, ecx
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], cx
lea ecx, [esp + 0x3c]
push eax
lea eax, [esp + 0x118]
push eax
call fcn.00401cd0
mov dword [esp + 0x330], 0
cmp word [esp + 0x8c], 0
jne 0x401582
xor ecx, ecx
jmp 0x40159f
lea ecx, [esp + 0x8c]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401590
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x44]
call fcn.00402270
push 4
push str..DLL
lea ecx, [esp + 0x44]
call fcn.00402270
cmp dword [esp + 0x50], 8
lea eax, [esp + 0x3c]
cmovae eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40181d
xor eax, eax
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], 0
mov word [esp + 0x24], ax
push 0x3e
mov byte [esp + 0x334], 1
push eax
mov word [esp + 0x9c], ax
lea eax, [esp + 0x9e]
push eax
call fcn.00418440
xor eax, eax
push 0x3e
push eax
mov word [esp + 0xe8], ax
lea eax, [esp + 0xea]
push eax
call fcn.00418440
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0xac]
add esp, 0x18
xorps xmm0, xmm0
movdqa xmmword [esp + 0x94], xmm0
movdqa xmmword [esp + 0xa4], xmm0
mov eax, dword [esi]
push 0x20
push ecx
lea ecx, [edi + 0x64]
mov eax, dword [eax + 0x14]
push ecx
mov ecx, esi
call eax
test eax, eax
je 0x40180a
cmp word [esp + 0x94], 0
jne 0x401679
xor ecx, ecx
jmp 0x401692
lea ecx, [esp + 0x94]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401683
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x2c]
call fcn.00402270
push 1
push 0x4237b0
lea ecx, [esp + 0x2c]
call fcn.00402270
mov eax, dword [esi]
lea ecx, [esp + 0xd4]
push 0x20
push ecx
xorps xmm0, xmm0
mov ecx, esi
mov eax, dword [eax + 0x14]
push edi
movdqa xmmword [esp + 0xe0], xmm0
movdqa xmmword [esp + 0xf0], xmm0
call eax
test eax, eax
je 0x40180a
cmp word [esp + 0xd4], 0
jne 0x4016f4
xor eax, eax
jmp 0x40170f
lea eax, [esp + 0xd4]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401700
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xd8]
push eax
lea ecx, [esp + 0x2c]
call fcn.00402270
push 1
push 0x4237b4
lea ecx, [esp + 0x2c]
call fcn.00402270
cmp dword [esi + 0x2c], 0
je 0x4017bf
push 1
push 0
push ecx
lea ecx, [esp + 0x30]
call fcn.00401f70
mov esi, eax
cmp esi, 0xffffffff
je 0x4017bf
push 2
sub esp, 8
lea ecx, [esp + 0x30]
push esi
call fcn.00401dd0
push 2
xor eax, eax
mov dword [esp + 0x8c], 7
push 0x4237b8
lea ecx, [esp + 0x7c]
mov dword [esp + 0x8c], 0
mov word [esp + 0x7c], ax
call fcn.00401cd0
mov eax, dword [esp + 0x84]
push 1
add eax, esi
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.00401f70
cmp dword [esp + 0x88], 8
mov esi, eax
jb 0x4017ba
push dword [esp + 0x74]
call fcn.0040fb05
add esp, 4
cmp esi, 0xffffffff
jne 0x401750
cmp dword [esp + 0x38], 8
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
push eax
push 0xffffffffffffffff
push 0x14a
push dword [esp + 0x28]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x10]
mov esi, eax
lea eax, [esp + 0x14]
add ecx, 0x30
push eax
call fcn.00401b30
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov cx, word [eax + 0x28]
cmp cx, word [esp + 0x14]
cmove edx, esi
mov dword [esp + 0x18], edx
cmp dword [esp + 0x38], 8
jb 0x40181d
push dword [esp + 0x24]
call fcn.0040fb05
add esp, 4
mov dword [esp + 0x330], 0xffffffff
cmp dword [esp + 0x50], 8
jb 0x40183b
push dword [esp + 0x3c]
call fcn.0040fb05
add esp, 4
inc edi
cmp edi, 0x217
jl 0x4014e0
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x401863
push 0
push eax
push 0x14e
push dword [esp + 0x28]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x10]
push 0xc9
push dword [eax + 0x24]
call dword [sym.imp.USER32.dll_LoadIconW]
mov esi, eax
test esi, esi
je 0x401899
push 0
push esi
push 0x170
push 0x3f0
push dword [esp + 0x30]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, 1
mov ecx, dword [esp + 0x328]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x314]
xor ecx, esp
call fcn.0040f324
mov esp, ebp
pop ebp
ret 0xc