Function at 0x422440
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4aadc3
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x5036c4]
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 ebx, ecx
mov dword [ebp - 0x278], ebx
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x218]
push 0x208
push 0
push eax
call fcn.00469cf0
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x422499
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4224c5
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4224cf
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [esi + 0x14], 8
jb 0x4224e5
mov esi, dword [esi]
push 1
push 1
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.00432220
add esp, 0x10
lea ecx, [ebx + 0x28]
mov edi, eax
lea eax, [ebp - 0x264]
push edi
push eax
call fcn.00427220
mov eax, dword [ebx + 0x28]
mov esi, dword [ebp - 0x264]
mov dword [ebp - 0x268], eax
cmp esi, eax
je 0x422573
cmp dword [esi + 0x24], 8
lea ecx, [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x264], edx
jb 0x422532
mov ecx, dword [ecx]
cmp dword [edi + 0x14], 8
mov ebx, dword [edi + 0x10]
jb 0x42253d
mov edi, dword [edi]
cmp edx, ebx
mov eax, ebx
cmovb eax, edx
push eax
push ecx
push edi
call fcn.00427140
add esp, 0xc
test eax, eax
jne 0x422566
mov eax, dword [ebp - 0x264]
cmp eax, ebx
jbe 0x422562
or eax, 0xffffffff
jmp 0x422566
sbb eax, eax
neg eax
shr eax, 0x1f
test al, al
je 0x422575
mov eax, dword [ebp - 0x268]
mov esi, eax
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x4225b5
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4225ab
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x422925
push edx
push ecx
call fcn.0043b7c2
add esp, 8
xor eax, eax
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
mov eax, dword [ebp - 0x278]
mov dword [ebp - 0x21c], 7
cmp esi, dword [eax + 0x28]
je 0x4227ee
add esi, 0x28
lea ecx, [ebp - 0x274]
push esi
call fcn.00420600
mov eax, dword [ebp - 0x274]
mov dword [ebp - 4], 0
cmp eax, dword [ebp - 0x270]
jne 0x422704
call fcn.00438c20
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x422910
push 0x5c
push 0x4d0b70
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], al
call fcn.0040a7b0
push 3
push 0x4d0bd0
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
call fcn.0040a7b0
push 0x8c
lea eax, [ebp - 0x248]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x310]
call fcn.00406590
mov esi, eax
push 0x4d0bd8
push esi
mov byte [ebp - 4], 3
call fcn.004056a0
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.004056a0
add esp, 0x10
call fcn.00438c20
push esi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x310]
call fcn.00407560
lea ecx, [ebp - 0x230]
call fcn.00406e50
lea ecx, [ebp - 0x248]
call fcn.00406e50
lea ecx, [ebp - 0x274]
call fcn.00426ed0
mov eax, 1
jmp 0x4227f0
mov byte [ebp - 4], 4
call fcn.004080e0
mov ecx, eax
test ecx, ecx
je 0x42292a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x264], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x268]
call fcn.004060b0
lea eax, [ebp - 0x264]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.00410b20
mov edx, dword [ebp - 0x268]
add esp, 8
mov byte [ebp - 4], 5
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x422777
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x274]
mov ebx, dword [ebp - 0x270]
mov esi, dword [ebp - 0x264]
cmp edi, ebx
je 0x4227cb
nop dword [eax]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x422795
mov ecx, dword [edi + 0x10]
sub eax, edx
sar eax, 1
mov edx, edi
cmp dword [edi + 0x14], 8
jb 0x4227b1
mov edx, dword [edi]
cmp ecx, eax
jne 0x4227c4
push ecx
push esi
push edx
call fcn.00427140
add esp, 0xc
test eax, eax
je 0x42280e
add edi, 0x18
cmp edi, ebx
jne 0x422790
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4227e3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00426ed0
xor eax, eax
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.0043ba78
mov esp, ebp
pop ebp
ret 4
cmp edi, ebx
je 0x4227cb
call fcn.00438c20
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x4228f8
push 0x5c
push 0x4d0c20
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], 0xf
mov byte [ebp - 0x260], al
call fcn.0040a7b0
push 3
push 0x4d0bd4
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 7
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], 0
call fcn.0040a7b0
push 0x93
lea eax, [ebp - 0x260]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x310]
call fcn.00406590
mov edi, eax
push str.in_black__no_need_load:
push edi
mov byte [ebp - 4], 9
call fcn.004056a0
lea eax, [ebp - 0x218]
push eax
push edi
call fcn.004056a0
add esp, 0x10
call fcn.00438c20
push edi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x310]
call fcn.00407560
lea ecx, [ebp - 0x248]
call fcn.00406e50
lea ecx, [ebp - 0x260]
call fcn.00406e50
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422910
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00426ed0
mov eax, 1
jmp 0x4227f0
call fcn.0046d258
push 0x80004005
call fcn.00407b40
int3