Function at 0x422d50
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ac533
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x4ef6d4]
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.0046b3e0
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x422da9
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x422dd5
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 0x422ddf
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 0x422df5
mov esi, dword [esi]
push 1
push 1
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.00433990
add esp, 0x10
lea ecx, [ebx + 0x30]
mov edi, eax
lea eax, [ebp - 0x264]
push edi
push eax
call fcn.00428560
mov eax, dword [ebx + 0x30]
mov esi, dword [ebp - 0x264]
mov dword [ebp - 0x268], eax
cmp esi, eax
je 0x422e83
cmp dword [esi + 0x24], 8
lea ecx, [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x264], edx
jb 0x422e42
mov ecx, dword [ecx]
cmp dword [edi + 0x14], 8
mov ebx, dword [edi + 0x10]
jb 0x422e4d
mov edi, dword [edi]
cmp edx, ebx
mov eax, ebx
cmovb eax, edx
push eax
push ecx
push edi
call fcn.00428480
add esp, 0xc
test eax, eax
jne 0x422e76
mov eax, dword [ebp - 0x264]
cmp eax, ebx
jbe 0x422e72
or eax, 0xffffffff
jmp 0x422e76
sbb eax, eax
neg eax
shr eax, 0x1f
test al, al
je 0x422e85
mov eax, dword [ebp - 0x268]
mov esi, eax
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x422ec5
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x422ebb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x423235
push edx
push ecx
call fcn.0043cf22
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 + 0x30]
je 0x4230fe
add esi, 0x28
lea ecx, [ebp - 0x274]
push esi
call fcn.00420cd0
mov eax, dword [ebp - 0x274]
mov dword [ebp - 4], 0
cmp eax, dword [ebp - 0x270]
jne 0x423014
call fcn.0043a380
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x423220
push 0x5c
push 0x4c26e8
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], al
call fcn.0040a7c0
push 3
push 0x4c2748
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.0040a7c0
push 0x95
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 0x4c2750
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.0043a380
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.00428210
mov eax, 1
jmp 0x423100
mov byte [ebp - 4], 4
call fcn.004080e0
mov ecx, eax
test ecx, ecx
je 0x42323a
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.00410b70
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 0x423087
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 0x4230db
nop dword [eax]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4230a5
mov ecx, dword [edi + 0x10]
sub eax, edx
sar eax, 1
mov edx, edi
cmp dword [edi + 0x14], 8
jb 0x4230c1
mov edx, dword [edi]
cmp ecx, eax
jne 0x4230d4
push ecx
push esi
push edx
call fcn.00428480
add esp, 0xc
test eax, eax
je 0x42311e
add edi, 0x18
cmp edi, ebx
jne 0x4230a0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4230f3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00428210
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.0043d1d8
mov esp, ebp
pop ebp
ret 4
cmp edi, ebx
je 0x4230db
call fcn.0043a380
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x423208
push 0x5c
push 0x4c2798
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], 0xf
mov byte [ebp - 0x260], al
call fcn.0040a7c0
push 3
push 0x4c274c
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.0040a7c0
push 0x9c
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.0043a380
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 0x423220
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x274]
call fcn.00428210
mov eax, 1
jmp 0x423100
call fcn.0046e938
push 0x80004005
call fcn.00407b40
int3