Function at 0x4223b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4aa563
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x5026c4]
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.00469a40
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x422409
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x422435
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 0x42243f
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 0x422455
mov esi, dword [esi]
push 1
push 1
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.00432170
add esp, 0x10
lea ecx, [ebx + 0x28]
mov edi, eax
lea eax, [ebp - 0x264]
push edi
push eax
call fcn.004271a0
mov eax, dword [ebx + 0x28]
mov esi, dword [ebp - 0x264]
mov dword [ebp - 0x268], eax
cmp esi, eax
je 0x4224e3
cmp dword [esi + 0x24], 8
lea ecx, [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x264], edx
jb 0x4224a2
mov ecx, dword [ecx]
cmp dword [edi + 0x14], 8
mov ebx, dword [edi + 0x10]
jb 0x4224ad
mov edi, dword [edi]
cmp edx, ebx
mov eax, ebx
cmovb eax, edx
push eax
push ecx
push edi
call fcn.004270c0
add esp, 0xc
test eax, eax
jne 0x4224d6
mov eax, dword [ebp - 0x264]
cmp eax, ebx
jbe 0x4224d2
or eax, 0xffffffff
jmp 0x4224d6
sbb eax, eax
neg eax
shr eax, 0x1f
test al, al
je 0x4224e5
mov eax, dword [ebp - 0x268]
mov esi, eax
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x422525
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x42251b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x422895
push edx
push ecx
call fcn.0043b702
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 0x42275e
add esi, 0x28
lea ecx, [ebp - 0x274]
push esi
call fcn.00420570
mov eax, dword [ebp - 0x274]
mov dword [ebp - 4], 0
cmp eax, dword [ebp - 0x270]
jne 0x422674
call fcn.00438b60
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x422880
push 0x5c
push 0x4cfb70
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], al
call fcn.0040a700
push 3
push 0x4cfbd0
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.0040a700
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.004064e0
mov esi, eax
push 0x4cfbd8
push esi
mov byte [ebp - 4], 3
call fcn.004055f0
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.004055f0
add esp, 0x10
call fcn.00438b60
push esi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x310]
call fcn.004074b0
lea ecx, [ebp - 0x230]
call fcn.00406da0
lea ecx, [ebp - 0x248]
call fcn.00406da0
lea ecx, [ebp - 0x274]
call fcn.00426e50
mov eax, 1
jmp 0x422760
mov byte [ebp - 4], 4
call fcn.00408030
mov ecx, eax
test ecx, ecx
je 0x42289a
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.00406000
lea eax, [ebp - 0x264]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.00410a80
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 0x4226e7
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 0x42273b
nop dword [eax]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x422705
mov ecx, dword [edi + 0x10]
sub eax, edx
sar eax, 1
mov edx, edi
cmp dword [edi + 0x14], 8
jb 0x422721
mov edx, dword [edi]
cmp ecx, eax
jne 0x422734
push ecx
push esi
push edx
call fcn.004270c0
add esp, 0xc
test eax, eax
je 0x42277e
add edi, 0x18
cmp edi, ebx
jne 0x422700
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422753
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00426e50
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.0043b9b8
mov esp, ebp
pop ebp
ret 4
cmp edi, ebx
je 0x42273b
call fcn.00438b60
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x422868
push 0x5c
push 0x4cfc20
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], 0xf
mov byte [ebp - 0x260], al
call fcn.0040a700
push 3
push 0x4cfbd4
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.0040a700
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.004064e0
mov edi, eax
push str.in_black__no_need_load:
push edi
mov byte [ebp - 4], 9
call fcn.004055f0
lea eax, [ebp - 0x218]
push eax
push edi
call fcn.004055f0
add esp, 0x10
call fcn.00438b60
push edi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x310]
call fcn.004074b0
lea ecx, [ebp - 0x248]
call fcn.00406da0
lea ecx, [ebp - 0x260]
call fcn.00406da0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422880
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00426e50
mov eax, 1
jmp 0x422760
call fcn.0046cf98
push 0x80004005
call fcn.00407a90
int3