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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48bdac
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
push ebx
push esi
push edi
mov eax, dword [0x4b47a8]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
lea eax, [esp + 0x18]
push eax
call fcn.0040a490
push str.tempmi.dat
lea ecx, [esp + 0x14]
push 0x4b9130
push ecx
mov dword [esp + 0xe4], 0
call fcn.00406070
add esp, 0xc
push eax
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0xe0], 1
call fcn.0040a7d0
mov byte [esp + 0xd8], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422279
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x42230f
test ebx, ebx
mov eax, ebx
je 0x42236f
mov edi, dword [eax + 8]
test edi, edi
mov ebx, dword [ebx]
je 0x422307
mov eax, dword [edi + 4]
lea esi, [edi + 4]
push 0
push eax
mov dword [esp + 0x18], 0
call fcn.0046b81d
add esp, 8
cmp eax, 0xffffffff
jne 0x4222c8
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4222d0
test al, 0x10
je 0x4222d0
mov dword [esp + 0x10], 1
mov eax, dword [esi]
mov ecx, dword [0x4b92a8]
push eax
push ecx
call fcn.00469941
add esp, 8
test eax, eax
je 0x422307
cmp dword [esp + 0x10], 0
je 0x422307
mov edx, dword [edi + 0x10]
mov eax, dword [ebp + 8]
push 1
push edx
add edi, 0xc
push edi
push eax
mov ecx, 1
mov edx, esi
call fcn.00421f20
test ebx, ebx
jne 0x422285
push str.tempwei.dat
lea ecx, [esp + 0x14]
push 0x4b9130
push ecx
call fcn.00406070
add esp, 0xc
push eax
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0xe0], 2
call fcn.0040a7d0
mov byte [esp + 0xd8], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422361
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x42244f
jmp 0x422378
call fcn.0044d52a
mov eax, dword [esp + 0x10]
test eax, eax
je 0x42236f
mov edi, dword [eax + 8]
test edi, edi
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
je 0x422444
mov eax, dword [edi + 4]
xor ebx, ebx
lea esi, [edi + 4]
push ebx
push eax
call fcn.0046b81d
add esp, 8
cmp eax, 0xffffffff
jne 0x4223b6
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4223bb
test al, 0x10
je 0x4223bb
mov ebx, 1
mov eax, dword [esi]
mov edx, dword [0x4b92a8]
push eax
push edx
call fcn.00469941
add esp, 8
test eax, eax
je 0x422444
test ebx, ebx
je 0x422444
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x18], eax
add edi, 0xc
call fcn.004258c0
push 0
lea edx, [esp + 0x18]
push edx
push edi
push esi
lea edi, [esp + 0x4c]
mov byte [esp + 0xe8], 3
call fcn.004278a0
test eax, eax
je 0x422433
push 0
push 1
mov edi, esi
lea eax, [esp + 0x44]
call fcn.00427bc0
mov eax, dword [ebp + 8]
cmp dword [eax + 0xdb0], 0
je 0x422433
lea edi, [eax + 0xd34]
push edi
call fcn.0043cdc0
call fcn.0043d340
lea ecx, [esp + 0x3c]
mov byte [esp + 0xd8], 0
call fcn.004259f0
cmp dword [esp + 0x10], 0
jne 0x422374
lea ecx, [esp + 0x18]
mov dword [esp + 0xd8], 0xffffffff
call fcn.0040a510
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4