Function at 0x422070
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a84a3
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x4ff5e4]
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.004679d0
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x4220c9
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4220f5
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 0x4220ff
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 0x422115
mov esi, dword [esi]
push 1
push 1
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.00431e20
add esp, 0x10
lea ecx, [ebx + 0x28]
mov edi, eax
lea eax, [ebp - 0x264]
push edi
push eax
call fcn.00426e50
mov eax, dword [ebx + 0x28]
mov esi, dword [ebp - 0x264]
mov dword [ebp - 0x268], eax
cmp esi, eax
je 0x4221a3
cmp dword [esi + 0x24], 8
lea ecx, [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x264], edx
jb 0x422162
mov ecx, dword [ecx]
cmp dword [edi + 0x14], 8
mov ebx, dword [edi + 0x10]
jb 0x42216d
mov edi, dword [edi]
cmp edx, ebx
mov eax, ebx
cmovb eax, edx
push eax
push ecx
push edi
call fcn.00426d70
add esp, 0xc
test eax, eax
jne 0x422196
mov eax, dword [ebp - 0x264]
cmp eax, ebx
jbe 0x422192
or eax, 0xffffffff
jmp 0x422196
sbb eax, eax
neg eax
shr eax, 0x1f
test al, al
je 0x4221a5
mov eax, dword [ebp - 0x268]
mov esi, eax
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x4221e5
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4221db
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x422555
push edx
push ecx
call fcn.0043b3b2
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 0x42241e
add esi, 0x28
lea ecx, [ebp - 0x274]
push esi
call fcn.00420230
mov eax, dword [ebp - 0x274]
mov dword [ebp - 4], 0
cmp eax, dword [ebp - 0x270]
jne 0x422334
call fcn.00438810
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x422540
push 0x5c
push 0x4cda60
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], al
call fcn.0040a3e0
push 3
push 0x4cdac0
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.0040a3e0
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.004061c0
mov esi, eax
push 0x4cdac8
push esi
mov byte [ebp - 4], 3
call fcn.004052d0
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.004052d0
add esp, 0x10
call fcn.00438810
push esi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x310]
call fcn.00407190
lea ecx, [ebp - 0x230]
call fcn.00406a80
lea ecx, [ebp - 0x248]
call fcn.00406a80
lea ecx, [ebp - 0x274]
call fcn.00426b00
mov eax, 1
jmp 0x422420
mov byte [ebp - 4], 4
call fcn.00407d10
mov ecx, eax
test ecx, ecx
je 0x42255a
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.00405ce0
lea eax, [ebp - 0x264]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.00410760
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 0x4223a7
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 0x4223fb
nop dword [eax]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4223c5
mov ecx, dword [edi + 0x10]
sub eax, edx
sar eax, 1
mov edx, edi
cmp dword [edi + 0x14], 8
jb 0x4223e1
mov edx, dword [edi]
cmp ecx, eax
jne 0x4223f4
push ecx
push esi
push edx
call fcn.00426d70
add esp, 0xc
test eax, eax
je 0x42243e
add edi, 0x18
cmp edi, ebx
jne 0x4223c0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422413
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00426b00
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.0043b668
mov esp, ebp
pop ebp
ret 4
cmp edi, ebx
je 0x4223fb
call fcn.00438810
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x422528
push 0x5c
push 0x4cdb10
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], 0xf
mov byte [ebp - 0x260], al
call fcn.0040a3e0
push 3
push 0x4cdac4
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.0040a3e0
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.004061c0
mov edi, eax
push str.in_black__no_need_load:
push edi
mov byte [ebp - 4], 9
call fcn.004052d0
lea eax, [ebp - 0x218]
push eax
push edi
call fcn.004052d0
add esp, 0x10
call fcn.00438810
push edi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x310]
call fcn.00407190
lea ecx, [ebp - 0x248]
call fcn.00406a80
lea ecx, [ebp - 0x260]
call fcn.00406a80
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422540
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00426b00
mov eax, 1
jmp 0x422420
call fcn.0046af28
push 0x80004005
call fcn.00407770
int3