Function at 0x413831
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x24
or dword [esp + 0xc], 0xffffffff
push ebx
push ebp
push 0x7d6
xor ebx, ebx
push 0x618
mov ebp, ebx
call fcn.00401286
mov dword [esp + 0x18], eax
test eax, eax
je 0x413c57
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esi + 0x4c]
mov dword [esp + 0x24], edi
mov al, byte [edi + 0x1d]
mov byte [esp + 0x13], al
lea eax, [edi + 0x80]
push eax
mov dword [esp + 0x30], eax
call fcn.0042353c
test eax, eax
je 0x41388d
push esi
call fcn.0042357c
jmp 0x413c55
cmp byte [edi + 0x38c], bl
mov ecx, 0x38c
mov eax, 0x80
cmovne eax, ecx
add eax, edi
push eax
call fcn.00403edb
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x4138d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4138c4
mov byte [edi + 0x23], bl
jmp 0x413c55
lea eax, [edi + 0x80]
push eax
push 2
jmp 0x413956
push eax
call fcn.00404753
mov dword [edi + 0x78], eax
cmp byte [edi + 0x38c], bl
je 0x4138f2
lea eax, [edi + 0x80]
push eax
call fcn.00404711
mov dword [edi + 0x78], eax
push dword [esp + 0x1c]
call fcn.004047ee
mov dword [esp + 0x14], eax
test eax, eax
jg 0x41390e
push edi
call fcn.0041468c
jmp 0x413c0f
cmp eax, 0x320c800
jl 0x413920
push dword [esp + 0x2c]
push 0x84
jmp 0x413956
push 0x7d7
add eax, 3
push eax
call fcn.00401286
mov ebp, eax
mov dword [esp + 0x30], ebp
test ebp, ebp
je 0x413c55
push dword [esp + 0x14]
push ebp
push dword [esp + 0x24]
call fcn.00403eb1
cmp eax, dword [esp + 0x14]
je 0x41397c
push dword [esp + 0x2c]
push 4
call fcn.00404b1d
mov esi, dword [esp + 0x24]
push eax
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebx
push esi
push dword [0x431e5c]
call fcn.00403461
jmp 0x413c55
push dword [esp + 0x1c]
call fcn.00403e76
mov eax, dword [esp + 0x14]
or dword [esp + 0x1c], 0xffffffff
push eax
push ebp
mov word [eax + ebp], bx
mov byte [eax + ebp + 2], bl
call fcn.00410a9a
test eax, eax
je 0x4139dd
lea eax, [edi + 0x80]
push eax
push 0x83
call fcn.00404b1d
push eax
push dword [esp + 0x28]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x101
push dword [esp + 0x24]
push dword [0x431e5c]
call fcn.00403461
cmp eax, 2
je 0x413c55
push edi
call fcn.0041468c
mov cl, byte [edi + 0x1c]
mov eax, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
cmp cl, 2
je 0x413bc8
cmp cl, 3
je 0x413b83
cmp cl, 4
je 0x413adb
cmp cl, 1
je 0x413a95
mov eax, 0xfeff
cmp word [ebp], ax
jne 0x413a2f
lea eax, [ebp + 2]
mov byte [edi + 0x20], 1
mov dword [esp + 0x28], eax
jmp 0x413add
cmp byte [ebp], 0xef
jne 0x413a51
cmp byte [ebp + 1], 0xbb
jne 0x413a51
cmp byte [ebp + 2], 0xbf
jne 0x413a51
lea eax, [ebp + 3]
mov byte [edi + 0x20], 1
mov dword [esp + 0x2c], eax
jmp 0x413b83
push dword [esp + 0x14]
push ebp
call fcn.00423138
test eax, eax
jne 0x413adb
push dword [esp + 0x14]
push ebp
call fcn.0042305e
test eax, eax
jne 0x413bc8
push dword [esp + 0x14]
push ebp
call fcn.004056f8
test eax, eax
jne 0x413b81
push dword [esp + 0x14]
push ebp
call fcn.00423082
test eax, eax
je 0x413bc8
push ebx
push ebp
push esi
call fcn.00410f81
push ebp
call fcn.00410a67
mov byte [edi + 0x1f], al
mov byte [edi + 0x1c], 2
cmp byte [ebp], bl
je 0x413c0f
mov edi, esi
mov ebx, ebp
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040687b
push dword [esp + 0x18]
mov esi, eax
push ebx
push edi
call fcn.004143fe
cmp byte [esi], 0
mov ebx, esi
jne 0x413ab7
jmp 0x413c05
mov eax, ebp
push 1
push eax
push esi
call fcn.00410f81
mov eax, dword [esp + 0x28]
mov edx, ebx
movzx ecx, word [eax]
lea esi, [eax + 2]
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x38]
test ecx, ecx
je 0x413b41
mov dword [esp + 0x14], 0xa
cmp ecx, 0xa
je 0x413b3e
mov edi, dword [esp + 0x24]
cmp ecx, 0xd
je 0x413b2c
mov esi, dword [esp + 0x2c]
movzx ecx, word [esi]
add esi, 2
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x38]
test ecx, ecx
jne 0x413b06
jmp 0x413b41
mov eax, dword [esp + 0x2c]
movzx ecx, word [eax]
mov eax, dword [esp + 0x28]
cmp cx, word [esp + 0x14]
je 0x413b41
xor edx, edx
inc edx
mov byte [edi + 0x1f], dl
mov byte [edi + 0x1c], 4
cmp word [eax], bx
je 0x413c0f
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x28]
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.004068b8
push dword [esp + 0x18]
mov esi, eax
push ebp
push edi
call fcn.00414309
mov ebp, esi
cmp word [esi], bx
jne 0x413b59
mov ebp, dword [esp + 0x30]
jmp 0x413c07
mov eax, ebp
push ebx
push eax
push esi
call fcn.00410f81
push dword [esp + 0x2c]
call fcn.00410a67
mov byte [edi + 0x1f], al
mov eax, dword [esp + 0x2c]
mov byte [edi + 0x1c], 3
cmp byte [eax], bl
je 0x413c0f
mov ebx, esi
mov edi, eax
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0040687b
push dword [esp + 0x18]
mov esi, eax
push edi
push ebx
call fcn.00414494
cmp byte [esi], 0
mov edi, esi
jne 0x413ba7
jmp 0x413c05
push ebx
push ebp
push esi
call fcn.00410f81
push ebp
call fcn.00410a67
mov byte [edi + 0x1f], al
mov byte [edi + 0x1c], 2
cmp byte [ebp], bl
je 0x413c0f
mov ebx, esi
mov edi, ebp
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0040687b
push dword [esp + 0x18]
mov esi, eax
push edi
push ebx
call fcn.0041435c
cmp byte [esi], 0
mov edi, esi
jne 0x413be6
xor ebx, ebx
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x24]
cmp byte [esp + 0x13], 0
jne 0x413c1f
cmp byte [edi + 0x1e], 0
jne 0x413c1f
mov byte [edi + 0x1d], bl
push esi
mov word [edi + 0x22], 0
call fcn.00414fb2
push edi
call fcn.0040f5c5
push esi
call fcn.00413c79
push ebx
push esi
call fcn.00410e5d
push esi
call fcn.00410ca2
push 1
push ebx
mov dword [edi + 0x10], ebx
push dword [esi]
call dword [sym.imp.USER32.dll_InvalidateRect]
xor ebx, ebx
inc ebx
pop edi
pop esi
push dword [esp + 0x14]
call fcn.00403e76
push dword [esp + 0x18]
call fcn.00404070
push ebp
call fcn.00404070
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret 4