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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd14
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 0x20c]
cmp eax, 4
push edi
je 0x402699
cmp eax, 5
je 0x402699
xor ebx, ebx
push 0x5c
lea eax, [esp + 0x28]
push ebx
push eax
mov dword [esp + 0x20], ebx
mov word [esp + 0x30], bx
mov word [esp + 0x32], bx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], 0x40eb24
call sub.msvcrt.dll_memset
or dword [esp + 0x3c], 0xffffffff
or dword [esp + 0x40], 0xffffffff
add esp, 0xc
push esi
mov esi, 0x104
mov eax, esi
lea edi, [esp + 0x84]
call fcn.00404556
pop ecx
mov eax, edi
push 0x7e
push eax
call sub.msvcrt.dll_wcschr
test eax, eax
pop ecx
pop ecx
je 0x4022a8
mov edi, 0x208
push edi
lea eax, [esp + 0x296]
push ebx
push eax
mov word [esp + 0x29c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x290]
push eax
lea eax, [esp + 0x84]
push eax
call fcn.00404903
test eax, eax
pop ecx
pop ecx
ja 0x402291
push edi
lea eax, [esp + 0xb16]
push ebx
push eax
mov word [esp + 0xb1c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push edi
lea eax, [esp + 0x6f6]
push ebx
push eax
mov word [esp + 0x6fc], bx
call sub.msvcrt.dll_memset
lea eax, [esp + 0x8c]
add esp, 0xc
push eax
lea esi, [esp + 0xb14]
call fcn.004047a7
pop ecx
lea eax, [esp + 0x6f0]
push eax
mov eax, esi
push eax
call fcn.00404903
test eax, eax
pop ecx
pop ecx
jbe 0x4022a8
lea ecx, [esp + 0x80]
call fcn.00404789
mov edi, eax
push edi
call sub.msvcrt.dll_wcslen
mov esi, eax
pop ecx
lea eax, [esp + 0x6f0]
push eax
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax + 1]
mov esi, 0x104
cmp eax, esi
pop ecx
jae 0x402289
lea eax, [esp + 0x6f0]
push edi
push eax
lea eax, [esp + 0x298]
call fcn.00404855
pop ecx
pop ecx
jmp 0x402291
mov word [esp + 0x290], bx
lea eax, [esp + 0x290]
push eax
mov eax, esi
lea edi, [esp + 0x84]
call fcn.00404556
pop ecx
mov esi, dword [0x412b48]
cmp dword [esi + 0x401c], ebx
je 0x402325
lea ecx, [esp + 0x80]
mov word [esp + 0x4a0], bx
mov dword [esp + 0xc], ebx
call fcn.00404789
add esi, 0x4020
mov dword [esp + 0x10], eax
push esi
jmp 0x402303
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x4a0]
push eax
call fcn.00404789
push eax
call fcn.00405311
cmp eax, ebx
pop ecx
pop ecx
jne 0x40231f
mov eax, dword [0x412b48]
add eax, 0x4020
push eax
lea eax, [esp + 0x4a4]
push eax
lea edi, [esp + 0x14]
call fcn.004051a7
test eax, eax
pop ecx
pop ecx
jne 0x4022db
jmp 0x402699
mov esi, dword [0x412b48]
cmp dword [esi + 0x6020], ebx
je 0x40239b
lea ecx, [esp + 0x80]
mov word [esp + 0x900], bx
mov dword [esp + 0xc], ebx
call fcn.00404789
add esi, 0x6024
mov dword [esp + 0x10], eax
push esi
jmp 0x40237e
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x900]
push eax
call fcn.00404789
push eax
call fcn.00405311
test eax, eax
pop ecx
pop ecx
jne 0x402699
mov eax, dword [0x412b48]
add eax, 0x6024
push eax
lea eax, [esp + 0x904]
push eax
lea edi, [esp + 0x14]
call fcn.004051a7
test eax, eax
pop ecx
pop ecx
jne 0x402352
mov esi, dword [0x412b48]
cmp dword [esi + 0x2018], ebx
je 0x402492
lea eax, [esp + 0x80]
push eax
mov word [esp + 0x294], bx
mov dword [esp + 0x10], ebx
mov word [esp + 0x6f4], bx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4023ed
test al, 0x10
je 0x4023ed
lea eax, [esp + 0x80]
push eax
mov eax, 0x104
lea edi, [esp + 0x6f4]
call fcn.00404556
jmp 0x402401
lea eax, [esp + 0x80]
push eax
lea esi, [esp + 0x6f4]
call fcn.004047a7
mov eax, dword [0x412b48]
pop ecx
add eax, 0x201c
push eax
lea eax, [esp + 0x294]
push eax
lea edi, [esp + 0x14]
call fcn.004051a7
test eax, eax
pop ecx
pop ecx
je 0x402492
lea eax, [esp + 0x290]
push 0x5c
push eax
call sub.msvcrt.dll_wcschr
pop ecx
test eax, eax
pop ecx
lea eax, [esp + 0x290]
push eax
jne 0x40244f
lea ecx, [esp + 0x6f4]
call fcn.00404789
jmp 0x402456
lea eax, [esp + 0x6f4]
push eax
call fcn.00405311
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
jne 0x402699
mov eax, dword [0x412b48]
add eax, 0x201c
push eax
lea eax, [esp + 0x294]
push eax
lea edi, [esp + 0x14]
call fcn.004051a7
test eax, eax
pop ecx
pop ecx
jne 0x402424
cmp esi, ebx
jne 0x402699
push 0x24c
lea eax, [esp + 0x4a8]
push ebx
push eax
mov dword [esp + 0x4ac], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x4a0]
push eax
lea eax, [esp + 0x84]
push eax
call fcn.004052ad
mov dword [esp + 0x14], eax
mov eax, dword [0x412b48]
cmp dword [eax + 0x825c], ebx
pop ecx
pop ecx
je 0x402521
test byte [esp + 0x4a0], 0x10
jne 0x402521
lea eax, [esp + 0x80]
push eax
lea esi, [esp + 0x904]
call fcn.004047a7
pop ecx
mov eax, esi
push eax
mov eax, 0x104
lea edi, [esp + 0x84]
call fcn.00404556
pop ecx
lea eax, [esp + 0x4a0]
push eax
mov eax, edi
push eax
call fcn.004052ad
pop ecx
pop ecx
mov dword [esp + 0xc], eax
lea eax, [esp + 0x80]
push eax
mov edi, 0x412350
call fcn.004054c7
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x20]
mov dword [esp + 0x30], eax
mov eax, dword [ecx]
push edx
call dword [eax + 0x50]
xor edi, edi
mov esi, eax
inc edi
cmp esi, ebx
jne 0x4025a7
mov eax, dword [0x412b48]
cmp dword [eax + 0x8268], ebx
mov dword [esp + 0x14], edi
lea esi, [esp + 0x20]
je 0x4025a7
lea eax, [esp + 0x290]
push eax
lea eax, [esp + 0x84]
mov word [esp + 0x294], bx
push eax
mov ebx, 0x412390
call fcn.00402a9c
test eax, eax
je 0x4025a5
lea eax, [esp + 0x290]
push eax
mov edi, 0x412370
call fcn.004054c7
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x34], eax
inc edi
jmp 0x4025a7
xor ebx, ebx
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x18]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x30], eax
mov eax, dword [ebp + 0xc]
mov word [esi + 6], di
mov eax, dword [eax + 0x20c]
cmp eax, 3
jne 0x4025d7
inc dword [esi + 0x18]
jmp 0x4025e8
cmp eax, 2
jne 0x4025e1
inc dword [esi + 0x20]
jmp 0x4025e8
cmp eax, edi
jne 0x4025e8
inc dword [esi + 0x1c]
cmp dword [esp + 0xc], ebx
je 0x40264d
mov eax, dword [esp + 0x4a4]
mov edx, dword [esp + 0x4c0]
mov ecx, dword [esp + 0x4bc]
mov dword [esi + 0x38], eax
mov eax, dword [esp + 0x4a8]
mov dword [esi + 0x3c], eax
mov eax, dword [esp + 0x4b4]
mov dword [esi + 0x40], eax
mov eax, dword [esp + 0x4b8]
mov dword [esi + 0x44], eax
mov eax, dword [esp + 0x4a0]
mov dword [esi + 0x34], eax
xor eax, eax
or eax, edx
xor edi, edi
or ecx, edi
mov dword [esi + 0x48], eax
mov dword [esi + 0x50], eax
inc edi
mov eax, ecx
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
jmp 0x402672
mov eax, dword [0x412b48]
cmp dword [eax + 0x8040], ebx
jne 0x40266f
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x58], ebx
cmp dword [esp + 0x14], ebx
je 0x402690
mov eax, dword [esp + 0x18]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 8]
mov ebx, esi
call fcn.0040742f
mov eax, dword [ebp + 8]
mov dword [eax + 0x2e4], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8