Function at 0x42e140
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x23c
mov eax, dword [0x477b14]
mov dword [esp + 0x238], eax
mov eax, dword [esp + 0x244]
mov edx, eax
and dl, 0x10
sub dl, 0x10
push ebx
push ebp
push esi
mov esi, ecx
xor ecx, ecx
neg dl
mov dword [esi + 0x4c], ecx
mov dword [esi + 8], ecx
mov dword [esi + 4], ecx
mov dword [esi + 0x50], ecx
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], ecx
sbb edx, edx
inc edx
mov dword [esi + 0x3c], edx
mov edx, eax
and dl, 2
sub dl, 2
neg dl
mov dword [esi + 0x38], ecx
mov ecx, eax
lea ebp, [esi + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
mov edi, dword [esp + 0x250]
sbb edx, edx
and cl, 0x20
sub cl, 0x20
inc edx
neg cl
push edi
mov dword [esi], 0x469ab0
mov dword [esi + 0x14], 1
mov dword [esi + 0x40], edx
sbb ecx, ecx
and al, 0x40
sub al, 0x40
inc ecx
neg al
mov dword [esi + 0x44], ecx
sbb eax, eax
inc eax
mov dword [esi + 0x54], eax
call ebx
cmp eax, 4
jle 0x42e33c
push 0x4665ec
push edi
mov dword [ebp], 0
call ebx
lea edx, [edi + eax*2 - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x42e211
push 0x2010
push eax
push eax
push eax
push edi
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [ebp], eax
jmp 0x42e33c
push 0x4667b0
push edi
call ebx
lea eax, [edi + eax*2 - 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x42e23d
lea eax, [esi + 0x3c]
push eax
push edi
call fcn.0042a150
add esp, 8
mov dword [ebp], eax
jmp 0x42e33c
push 0x4667a4
push edi
call ebx
lea ecx, [edi + eax*2 - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x42e26c
push edi
mov dword [esi + 0x3c], 1
call fcn.00428a90
add esp, 4
mov dword [ebp], eax
jmp 0x42e33c
push 0x4665f8
push edi
call ebx
lea edx, [edi + eax*2 - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x42e33c
push edi
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
call fcn.00429ee0
add esp, 4
mov dword [ebp], eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x44]
push eax
call edi
lea ecx, [esp + 0x40]
push ecx
call ebx
lea eax, [esp + eax*2 + 0x38]
push str.MASK.jpg
push eax
call edi
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42e33c
lea eax, [esp + 0x40]
push eax
call fcn.00429ee0
mov edi, eax
add esp, 4
test edi, edi
je 0x42e33c
mov edx, dword [ebp]
mov ebx, dword [sym.imp.GDI32.dll_GetObjectW]
lea ecx, [esp + 0x10]
push ecx
push 0x18
push edx
mov dword [esi + 0x3c], 1
call ebx
lea eax, [esp + 0x28]
push eax
push 0x18
push edi
call ebx
mov eax, dword [esp + 0x14]
imul eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
add ecx, 3
add edx, 2
test eax, eax
jbe 0x42e335
jmp 0x42e320
mov bl, byte [edx]
cmp bl, 0xa
mov byte [ecx], bl
jae 0x42e32c
mov byte [ecx], 0
add ecx, 4
add edx, 4
dec eax
jne 0x42e320
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp]
test eax, eax
je 0x42e3b4
mov ebx, dword [sym.imp.GDI32.dll_GetObjectW]
lea edi, [esi + 0x18]
push edi
push 0x18
push eax
call ebx
mov ax, word [esi + 0x2a]
cmp ax, 0x20
jne 0x42e36c
mov ecx, dword [esi + 0x3c]
test ecx, ecx
jne 0x42e36c
mov dword [esi + 0x48], 0x18
jmp 0x42e372
movzx ecx, ax
mov dword [esi + 0x48], ecx
push ebp
call fcn.0042df90
add esp, 4
test eax, eax
je 0x42e388
mov edx, dword [ebp]
push edi
push 0x18
push edx
call ebx
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x54]
test eax, eax
mov dword [esi + 0x10], ecx
jne 0x42e3b4
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [ebp]
push edx
push eax
mov dword [esi + 0x50], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esi + 0x34], eax
mov ecx, dword [esp + 0x248]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
call fcn.00444c27
add esp, 0x23c
ret 8