Function at 0x436d10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b1cee
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4f4930]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push esi
push edi
mov eax, dword [0x4f4930]
xor eax, esp
push eax
lea eax, [esp + 0x258]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x436eac
cmp word [eax], 0
je 0x436eac
lea eax, [ebx + 0xbc]
push eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x18]
add ebx, 0xc
mov dword [esp + 0x40], ebx
cmp edi, dword [ebx + 0x10]
jbe 0x436d9c
call fcn.00470dee
mov esi, dword [ebx]
mov edi, edi
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x1c], eax
cmp dword [ebx + 0xc], eax
jbe 0x436db1
call fcn.00470dee
mov eax, dword [ebx]
test esi, esi
je 0x436dbb
cmp esi, eax
je 0x436dc0
call fcn.00470dee
cmp edi, dword [esp + 0x1c]
je 0x436e2d
test esi, esi
jne 0x436e0c
call fcn.00470dee
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x436ddb
call fcn.00470dee
mov eax, dword [edi]
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + 0xc]
push ecx
push eax
call fcn.0046ff94
add esp, 8
test eax, eax
je 0x436e14
test esi, esi
jne 0x436e10
call fcn.00470dee
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x436e07
call fcn.00470dee
add edi, 4
jmp 0x436da0
mov eax, dword [esi]
jmp 0x436dd1
mov eax, dword [esi]
jmp 0x436dfd
test esi, esi
jne 0x436e6f
call fcn.00470dee
cmp edi, dword [esi + 0x10]
jb 0x436e27
call fcn.00470dee
mov edx, dword [edi]
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x28]
xor ebx, ebx
cmp eax, ebx
jne 0x436eae
push 0x3c
call fcn.004706a8
mov esi, eax
add esp, 4
mov dword [esp + 0x3c], esi
mov dword [esp + 0x260], ebx
cmp esi, ebx
je 0x436e73
push esi
call fcn.00440910
mov dword [esi], 0x4d7884
mov dword [esp + 0x18], esi
jmp 0x436e79
mov esi, dword [esi]
jmp 0x436e1d
mov dword [esp + 0x18], ebx
mov esi, ebx
mov dword [esp + 0x260], 0xffffffff
mov dword [esp + 0x28], esi
cmp esi, ebx
je 0x436eac
mov edi, dword [esp + 0x2c]
push 0x2e
push edi
call fcn.0047030c
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x436ed4
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
xor eax, eax
mov ecx, dword [esp + 0x258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.0046fdae
mov esp, ebp
pop ebp
ret 4
mov eax, edi
call fcn.00436b20
mov dword [esp + 0x1c], eax
cmp eax, ebx
jne 0x436f51
push 0x4d7850
push esi
call fcn.0046ff94
add esp, 8
test eax, eax
jne 0x436eff
mov dword [esp + 0x1c], 1
jmp 0x436f51
push str..png
push esi
call fcn.0046ff94
add esp, 8
test eax, eax
jne 0x436f1b
mov dword [esp + 0x1c], 2
jmp 0x436f51
push str..jpg
push esi
call fcn.0046ff94
add esp, 8
test eax, eax
jne 0x436f37
mov dword [esp + 0x1c], 3
jmp 0x436f51
push str..gif
push esi
call fcn.0046ff94
add esp, 8
test eax, eax
jne 0x436f51
mov dword [esp + 0x1c], 4
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x17], 0
cmp eax, 1
je 0x436fa5
cmp eax, 2
jne 0x436f73
mov ecx, dword [esp + 0x18]
push edi
push ecx
mov eax, edi
call fcn.00440bf0
jmp 0x436f99
cmp eax, 3
jne 0x436f87
mov edx, dword [esp + 0x18]
push edi
push edx
mov eax, edi
call fcn.00440da0
jmp 0x436f99
cmp eax, 4
jne 0x436fa5
mov eax, dword [esp + 0x18]
push edi
push eax
mov eax, edi
call fcn.00440a40
mov byte [esp + 0x17], al
test al, al
jne 0x4371db
mov ebx, dword [esp + 0x30]
add ebx, 0x84
lea esi, [esp + 0x20]
mov edi, ebx
mov dword [esp + 0x3c], ebx
call fcn.004374e0
mov edi, dword [esp + 0x20]
mov esi, dword [ebx + 0x10]
cmp dword [ebx + 0xc], esi
jbe 0x436fcf
call fcn.00470dee
mov eax, dword [ebx]
test edi, edi
je 0x436fd9
cmp edi, eax
je 0x436fde
call fcn.00470dee
mov ebx, dword [esp + 0x24]
cmp ebx, esi
je 0x4370a4
test edi, edi
jne 0x437033
call fcn.00470dee
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x436fff
call fcn.00470dee
mov ecx, dword [esp + 0x2c]
mov ebx, dword [ebx]
push ecx
call fcn.004331f0
test eax, eax
je 0x437079
mov ecx, dword [esp + 0x1c]
cmp ecx, 1
je 0x43706e
cmp ecx, 2
jne 0x437037
mov edx, dword [eax + 8]
mov ecx, dword [eax + 4]
mov esi, dword [esp + 0x18]
push edx
mov edx, dword [eax]
push ecx
push edx
call fcn.00440cb0
jmp 0x43706a
mov eax, dword [edi]
jmp 0x436ff5
cmp ecx, 3
jne 0x437051
mov ecx, dword [eax + 8]
mov edx, dword [eax]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [eax + 4]
call fcn.00440e80
jmp 0x43706a
cmp ecx, 4
jne 0x43706e
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push eax
call fcn.00440b00
mov byte [esp + 0x17], al
cmp byte [esp + 0x17], 0
jne 0x4371db
test edi, edi
jne 0x4370a0
call fcn.00470dee
xor eax, eax
mov ecx, dword [esp + 0x24]
cmp ecx, dword [eax + 0x10]
jb 0x437092
call fcn.00470dee
add dword [esp + 0x24], 4
mov ebx, dword [esp + 0x3c]
jmp 0x436fc2
mov eax, dword [edi]
jmp 0x437084
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x4e]
push eax
mov word [esp + 0x50], dx
call fcn.00476c30
mov ebx, dword [esp + 0x3c]
mov esi, dword [ebx + 0x60]
add esp, 0xc
cmp esi, dword [ebx + 0x64]
jbe 0x4370cf
call fcn.00470dee
mov ecx, dword [ebx + 0x54]
mov dword [esp + 0x20], ecx
mov edi, dword [ebx + 0x64]
cmp dword [ebx + 0x60], edi
jbe 0x4370e7
call fcn.00470dee
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx + 0x54]
test ecx, ecx
je 0x4370f2
cmp ecx, eax
je 0x4370fb
call fcn.00470dee
mov ecx, dword [esp + 0x20]
cmp esi, edi
je 0x436ea1
test ecx, ecx
jne 0x437175
call fcn.00470dee
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x437118
call fcn.00470dee
mov edi, dword [esp + 0x2c]
mov ecx, dword [esi]
push edi
push ecx
push 0x4d5b8c
lea edx, [esp + 0x50]
push 0x104
push edx
call fcn.0046fdbd
lea eax, [esp + 0x58]
add esp, 0x14
test eax, eax
je 0x4371b2
mov ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4371b2
shr eax, 4
not al
and al, 1
je 0x4371b2
mov eax, dword [esp + 0x1c]
cmp eax, 1
je 0x4371a7
cmp eax, 2
jne 0x437179
mov edx, dword [esp + 0x18]
push edi
push edx
lea eax, [esp + 0x4c]
call fcn.00440bf0
jmp 0x4371a3
mov eax, dword [ecx]
jmp 0x43710e
cmp eax, 3
jne 0x43718f
mov eax, dword [esp + 0x18]
push edi
push eax
lea eax, [esp + 0x4c]
call fcn.00440da0
jmp 0x4371a3
cmp eax, 4
jne 0x4371a7
mov ecx, dword [esp + 0x18]
push edi
push ecx
lea eax, [esp + 0x4c]
call fcn.00440a40
mov byte [esp + 0x17], al
cmp byte [esp + 0x17], 0
jne 0x4371db
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4371d7
call fcn.00470dee
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x4371cb
call fcn.00470dee
mov ecx, dword [esp + 0x20]
add esi, 4
jmp 0x4370d6
mov eax, dword [eax]
jmp 0x4371c1
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x40]
lea ebx, [esp + 0x28]
call fcn.0043b650
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
jmp 0x436eae