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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x627ec0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
mov eax, dword [esi + 0x1bc]
mov dword [ebp - 0x18], esi
cmp eax, 2
mov dword [ebp - 4], edi
jne 0x524477
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], edi
mov word [ebp - 0x28], di
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
push eax
call fcn.005234b0
cmp dword [0x6d12c4], edi
je 0x5240ef
mov eax, dword [ebp - 0x2c]
cmp eax, edi
jne 0x5240e3
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x52410c
mov eax, dword [ebp - 0x2c]
cmp eax, edi
jne 0x5240f9
lea eax, [ebp - 0x28]
push 1
push eax
call fcn.00495c30
add esp, 8
cmp eax, edi
jne 0x52446b
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], edi
mov word [ebp - 0x34], di
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 2
cmp eax, edi
jne 0x524124
lea eax, [ebp - 0x28]
mov esi, dword [0x6d2330]
cmp esi, edi
je 0x5241e3
cmp eax, edi
je 0x5241e3
push eax
lea ecx, [ebp - 0x44]
call fcn.0040e5a0
mov ebx, 3
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], bl
call fcn.00401070
push esi
lea ecx, [ebp - 0x68]
call fcn.00402380
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 4
cmp eax, edi
jne 0x52416a
lea eax, [ebp - 0x40]
mov esi, dword [ebp - 0x60]
push eax
call fcn.005e639f
lea esi, [eax + esi + 2]
lea edi, [esi + esi]
push edi
call fcn.005feedc
mov edx, eax
add esp, 8
test edx, edx
mov dword [ebp - 0x38], edx
je 0x5241ca
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, ebx
rep stosb byte es:[edi], al
lea ecx, [ebp - 0x44]
call fcn.00402400
push eax
lea ecx, [ebp - 0x68]
call fcn.00402400
push eax
mov eax, dword [ebp - 0x38]
push esi
push eax
call fcn.005e632f
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.005e639f
add esp, 0x14
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], bl
call fcn.00401070
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.00401070
xor edi, edi
mov edx, dword [0x6d1f4c]
push edi
push edx
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x48], edi
mov word [ebp - 0x4c], di
call fcn.00402e00
mov ecx, dword [ebp - 0x50]
mov byte [ebp - 4], 5
cmp ecx, edi
jne 0x52420b
lea ecx, [ebp - 0x4c]
mov eax, dword [ebp - 0x38]
cmp eax, edi
jne 0x524215
lea eax, [ebp - 0x34]
push 4
push ecx
push eax
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ebx, 6
cmp eax, ebx
jne 0x5243f8
mov eax, dword [ebp - 0x2c]
cmp eax, edi
jne 0x524237
lea eax, [ebp - 0x28]
push eax
call fcn.005e639f
mov ecx, dword [ebp - 0x2c]
add esp, 4
cmp ecx, edi
mov edx, ecx
jne 0x52424c
lea edx, [ebp - 0x28]
cmp word [edx + eax*2 - 2], 0x5c
je 0x5242ed
mov eax, 0x6a015c
test eax, eax
je 0x5242ed
push eax
call fcn.005e639f
add esp, 4
test eax, eax
je 0x5242ea
mov eax, dword [ebp - 0x2c]
cmp eax, edi
je 0x524286
push eax
call fcn.005e639f
add esp, 4
mov esi, eax
jmp 0x524288
xor esi, esi
push 0x6a015c
call fcn.005e639f
add eax, esi
lea ecx, [eax + eax + 2]
push ecx
call fcn.005feedc
mov esi, eax
add esp, 8
cmp esi, edi
je 0x5242ea
mov eax, dword [ebp - 0x2c]
cmp eax, edi
je 0x5242c5
push eax
push esi
call fcn.005e6569
push 0x6a015c
push esi
call fcn.005e653f
add esp, 0x10
jmp 0x5242d3
push 0x6a015c
push esi
call fcn.005e6569
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00401070
push esi
mov dword [ebp - 0x2c], esi
call fcn.005e639f
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, edi
jne 0x5242f4
lea ecx, [ebp - 0x28]
add ecx, 6
push 0x5c
push ecx
call fcn.005e699b
add esp, 8
mov esi, eax
cmp esi, edi
je 0x524450
mov eax, dword [ebp - 0x2c]
cmp eax, edi
jne 0x524316
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x3c], edi
mov word [ebp - 0x40], di
call fcn.00402410
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], bl
cmp ecx, edi
jne 0x524336
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x2c]
cmp eax, edi
jne 0x524340
lea eax, [ebp - 0x28]
mov edx, esi
sub edx, eax
sar edx, 1
mov word [ecx + edx*2], di
mov eax, dword [ebp - 0x44]
cmp eax, edi
jne 0x524354
lea eax, [ebp - 0x40]
push 1
push eax
call fcn.00495c30
add esp, 8
cmp eax, edi
jne 0x52442f
mov eax, dword [ebp - 0x44]
cmp eax, edi
jne 0x524371
lea eax, [ebp - 0x40]
push 1
push eax
call fcn.00495e10
add esp, 8
cmp eax, edi
jne 0x52442f
mov eax, dword [0x6cc708]
mov dword [ebp - 0x1c], eax
push edi
lea ecx, [ebp - 0x20]
push edi
push ecx
push 0x400
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [ebp - 0x20]
mov eax, dword [0x6d232c]
push edx
lea ecx, [ebp - 0x1c]
push eax
push ecx
call fcn.005fb90b
mov edx, dword [ebp - 0x20]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push 0x30
push 0x6a0028
push eax
call fcn.00600b34
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.00602ad6
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 5
call fcn.00401070
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 2
call fcn.00401070
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00401070
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.00401070
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add esi, 2
push 0x5c
push esi
call fcn.005e699b
add esp, 8
lea ecx, [ebp - 0x44]
mov esi, eax
mov byte [ebp - 4], 5
call fcn.00401070
jmp 0x524304
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 2
call fcn.00401070
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00401070
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.00401070
mov eax, dword [esi + 0x5c]
mov byte [ebp - 0x11], 0
add eax, 0x298
mov ecx, dword [eax]
cmp ecx, edi
jne 0x52448c
lea ecx, [eax + 4]
push ecx
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x54], edi
mov word [ebp - 0x58], di
call fcn.00402410
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 8
mov eax, dword [edi + 0x5c]
mov cl, byte [eax + 0x2b9]
mov esi, dword [eax + 0x294]
mov bl, byte [eax + 0x2a4]
mov byte [ebp - 0x12], cl
mov ecx, edi
call fcn.00523960
mov eax, dword [edi + 0x5c]
cmp esi, dword [eax + 0x294]
jne 0x524508
cmp esi, 2
jne 0x52450c
mov ecx, dword [eax + 0x298]
test ecx, ecx
jne 0x5244e5
lea ecx, [eax + 0x29c]
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x5244ef
lea eax, [ebp - 0x58]
push ecx
push eax
call fcn.005e8a3c
add esp, 8
test eax, eax
jne 0x524508
mov edx, dword [edi + 0x5c]
cmp bl, byte [edx + 0x2a4]
je 0x52450c
mov byte [ebp - 0x11], 1
mov eax, dword [edi + 0x5c]
mov cl, byte [ebp - 0x12]
cmp cl, byte [eax + 0x2b9]
jne 0x524525
mov cl, byte [ebp - 0x11]
test cl, cl
je 0x52460d
mov ecx, dword [eax + 0xb0]
xor bl, bl
cmp ecx, 0x3e8
mov byte [ebp - 0x11], bl
jle 0x52455a
mov edx, dword [eax + 0x418]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 4
push 0x1436
push 0x111
push edx
call edi
mov bl, 1
mov byte [ebp - 0x11], bl
jmp 0x524560
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 9
mov ecx, dword [eax + 0x5c]
add ecx, 0x100
call fcn.005d4fc0
xor esi, esi
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0x5c]
cmp esi, dword [ecx + 0xb0]
jge 0x5245c9
push esi
call fcn.004beb30
test bl, bl
je 0x5245bd
mov edx, dword [ebp - 0x18]
lea eax, [esi + esi*4]
mov ecx, dword [edx + 0x5c]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv dword [ecx + 0xb0]
test eax, eax
jle 0x5245bd
push eax
mov eax, dword [ecx + 0x418]
push 0x143e
push 0x111
push eax
call edi
inc esi
jmp 0x524577
mov edi, dword [ebp - 0x18]
mov esi, dword [sym.imp.USER32.dll_PostMessageA]
push 0
push 0x1437
mov ecx, dword [edi + 0x5c]
push 0x111
mov dword [ebp - 4], 8
mov edx, dword [ecx + 0x418]
push edx
call esi
test bl, bl
je 0x52460d
mov eax, dword [edi + 0x5c]
push 0
push 0x143d
push 0x111
mov ecx, dword [eax + 0x410]
push ecx
call esi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0
call fcn.00401070
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret