Function at 0x436a70
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x445890
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x45bb20]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x45c9f8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x45c944]
cmp eax, dword [ecx + 4]
jg 0x436d6f
cmp dword [0x45bb10], 0
jne 0x436d34
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x24c], 0
push eax
push fcn.00436a70
push 6
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
je 0x436d34
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push dword [ebp - 0x24c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push 0x5c
push eax
call sub.VCRUNTIME140.dll_wcsrchr
add esp, 8
test eax, eax
je 0x436b39
xor ecx, ecx
mov word [eax], cx
xor eax, eax
mov dword [ebp - 0x248], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
lea edx, [ecx + 2]
mov word [ebp - 0x248], ax
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x436b70
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x248]
call fcn.00402190
mov ecx, dword [ebp - 0x238]
mov eax, 0x7ffffffe
sub eax, ecx
mov dword [ebp - 4], 0
cmp eax, 0xe
jb 0x436da5
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
mov ebx, dword [ebp - 0x248]
lea edi, [ebp - 0x230]
cmovae eax, ebx
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x258], eax
mov esi, 7
lea eax, [ecx + 0xe]
mov dword [ebp - 0x250], edi
mov dword [ebp - 0x254], eax
cmp eax, esi
jbe 0x436c3a
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x436c07
mov esi, 0x7ffffffe
jmp 0x436c11
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402050
mov ecx, dword [ebp - 0x238]
mov edi, eax
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x250], edi
mov dword [ebp - 0x230], edi
mov dword [ebp - 0x21c], esi
lea esi, [ecx + ecx]
push esi
push dword [ebp - 0x258]
mov dword [ebp - 0x220], eax
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x250]
add edi, esi
mov ecx, 7
mov esi, str.wpsphoto.exe
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x238]
xor edx, edx
add esp, 0xc
mov word [eax + ecx*2 + 0x1c], dx
mov edx, dword [0x45bb14]
cmp edx, 8
jb 0x436cb6
mov ecx, dword [0x45bb00]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x436cac
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436d24
push edx
push ecx
call fcn.0043ca8f
add esp, 8
mov eax, dword [ebp - 0x230]
mov dword [0x45bb00], eax
mov eax, dword [ebp - 0x22c]
mov dword [0x45bb04], eax
mov eax, dword [ebp - 0x228]
mov dword [0x45bb08], eax
mov eax, dword [ebp - 0x224]
mov dword [0x45bb0c], eax
mov eax, dword [ebp - 0x220]
mov dword [0x45bb10], eax
mov eax, dword [ebp - 0x21c]
mov dword [0x45bb14], eax
mov eax, dword [ebp - 0x234]
cmp eax, 8
jb 0x436d34
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x436d2a
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x436d2a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push ebx
call fcn.0043ca8f
add esp, 8
cmp dword [0x45bb14], 8
mov eax, 0x45bb00
cmovae eax, dword [0x45bb00]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret
push 0x45c944
call fcn.0043cf7a
add esp, 4
cmp dword [0x45c944], 0xffffffff
jne 0x436abe
push 0x446640
call fcn.0043cce7
push 0x45c944
call fcn.0043cf30
add esp, 8
jmp 0x436abe
call fcn.00402040
int3