Function at 0x4021c0
Capabilities:
Check if file exists
Link many functions at runtime

Disassembly:
sub esp, 0xc0
mov eax, dword [0x40701c]
xor eax, esp
mov dword [esp + 0xbc], eax
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebp, ebp
lea esi, [esp + 0x18]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebp
call fcn.00401ff0
lea esi, [esp + 0x14]
call fcn.00401ff0
push eax
lea eax, [esp + 0x2c]
push eax
mov ebx, 0x405404
call fcn.00402850
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40222d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4024db
lea ebx, [esp + 0x24]
lea edi, [esp + 0x10]
lea esi, [esp + 0x14]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], ebp
call fcn.00402130
mov eax, dword [esp + 0x14]
cmp eax, 5
jne 0x4023a6
cmp dword [esp + 0x10], 1
jne 0x4024db
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x14]
push eax
mov ebx, 0x40541c
call fcn.00402850
mov ecx, dword [esp + 0x18]
push ebp
push ecx
call dword [sym.imp.MSVCR80.dll__waccess]
add esp, 0x10
cmp eax, 0xffffffff
je 0x40238d
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
mov ebx, 0x405424
call fcn.00402850
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebp
je 0x40236d
mov edx, dword [esp + 0x10]
push edx
lea esi, [esp + 0x30]
call fcn.00402b00
mov eax, dword [eax]
push eax
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
je 0x402301
push eax
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40543c
push edi
call esi
cmp eax, ebp
mov ebx, 0x10
je 0x402332
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
jae 0x40232f
lea ecx, [esp + 0xb4]
push ecx
call eax
push 0x40544c
push edi
call esi
cmp eax, ebp
je 0x402360
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x1c], 1
jae 0x40235d
lea ecx, [esp + 0xb4]
push ecx
call eax
lea ecx, [esp + 0xb0]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40238d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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
jmp 0x4024cf
cmp eax, 6
jne 0x4024db
cmp dword [esp + 0x10], 1
jne 0x4024db
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
mov ebx, 0x40545c
call fcn.00402850
mov eax, dword [esp + 0x18]
push ebp
push eax
call dword [sym.imp.MSVCR80.dll__waccess]
add esp, 0x10
cmp eax, 0xffffffff
je 0x4024bb
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
mov ebx, 0x405468
call fcn.00402850
mov eax, dword [esp + 0x1c]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebp
je 0x4024b2
mov ecx, dword [esp + 0x10]
push ecx
lea esi, [esp + 0x30]
call fcn.00402b00
mov edx, dword [eax]
push edx
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
je 0x402446
push eax
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x405480
push edi
call esi
cmp eax, ebp
mov ebx, 0x10
je 0x402477
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
jae 0x402474
lea ecx, [esp + 0xb4]
push ecx
call eax
push 0x405490
push edi
call esi
cmp eax, ebp
je 0x4024a5
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x1c], 1
jae 0x4024a2
lea ecx, [esp + 0xb4]
push ecx
call eax
lea ecx, [esp + 0xb0]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [esp + 0x14]
call fcn.00402b80
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4024db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [esp + 0x20]
mov dword [esp + 0x24], eax
call esi
lea ecx, [esp + 0x10]
push ecx
mov ecx, 0x405364
mov ebp, eax
call fcn.00402730
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x104
or edx, ecx
jge 0x402529
mov ecx, 0x104
lea eax, [esp + 0x10]
call fcn.00402d90
mov eax, dword [esp + 0x10]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x402543
xor eax, eax
jmp 0x402565
mov eax, edx
lea esi, [eax + 2]
jmp 0x402550
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402550
sub eax, esi
sar eax, 1
js 0x4026f0
cmp eax, dword [edx - 8]
jg 0x4026f0
mov dword [edx - 0xc], eax
mov edx, dword [esp + 0x10]
mov word [edx + eax*2], 0
mov eax, dword [esp + 0x10]
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_wcsrchr]
add esp, 8
test eax, eax
jne 0x402594
or eax, 0xffffffff
jmp 0x40259a
sub eax, dword [esp + 0x10]
sar eax, 1
add eax, 1
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
call fcn.004027e0
mov ecx, dword [eax]
mov esi, dword [esp + 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x4025fc
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4025ef
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4025ef
call fcn.00402de0
mov ebx, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x4025e6
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [esp + 0x10], ebx
jmp 0x4025fc
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x14]
call fcn.00402cf0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40261c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004016e0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402649
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov esi, eax
sub esi, ebp
call edi
push 0x4054a4
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
call edi
mov edi, eax
sub edi, ebp
test ebx, ebx
je 0x402695
push 0x4054bc
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40268e
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push esi
push edi
push ecx
push edx
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4026b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4026d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xcc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00403682
add esp, 0xc0
ret
push 0x80070057
call fcn.00401000
int3