Function at 0x402a30
Capabilities:
Check if file exists
Get disk size
Get file attributes
Get file size

Disassembly:
sub esp, 0x268
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x27c]
test edi, edi
je 0x402a55
push 0x64
push 2
push 0x404
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, dword [esp + 0x288]
mov ebx, dword [esp + 0x280]
lea eax, [esp + 0x10]
push eax
push ecx
push ebx
call fcn.00403510
add esp, 0xc
test eax, eax
jne 0x402d31
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x402aa9
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0xd0008000
pop ebx
add esp, 0x268
ret
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x38]
push edx
push eax
call fcn.00403780
mov esi, eax
add esp, 8
test esi, esi
je 0x402ad9
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x268
ret
mov ebp, dword [esp + 0x28c]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402b2e
mov eax, dword [esp + 0x290]
test eax, eax
je 0x402b2e
cmp dword [eax], 0
jne 0x402b2e
mov edx, dword [esp + 0x284]
push eax
push 0
push edx
push edi
call fcn.00403050
mov esi, eax
add esp, 0x10
test esi, esi
je 0x402b2e
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x268
ret
push 0
push 0
lea ecx, [esp + 0x2c]
push 0
push ecx
push ebp
call fcn.0041274a
lea edx, [esp + 0x38]
push 0x43d0d0
push edx
call fcn.00412213
add esp, 0x1c
lea eax, [esp + 0x30]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x24]
push 0
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x402b87
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0xd0018002
pop ebx
add esp, 0x268
ret
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x5c]
mov esi, dword [esp + 0x58]
mov ecx, dword [esp + 0x1c]
cmp eax, edx
jb 0x402c0c
ja 0x402ba1
cmp ecx, esi
jbe 0x402c0c
test edi, edi
je 0x402bb5
push 0x64
push 4
push 0x404
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub ecx, 0x3c
push ebp
sbb edx, 0
lea eax, [esp + 0x3c]
push edx
push ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push ebx
push edi
call fcn.00402e70
mov edx, dword [esp + 0x2c]
add esp, 0x1c
mov esi, eax
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x402d2f
mov eax, dword [esp + 0x288]
push eax
call fcn.004033a0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x268
ret
mov ebp, dword [esp + 0x14]
add ecx, ebp
mov ebp, dword [esp + 0x18]
adc eax, ebp
cmp eax, edx
jb 0x402d1f
ja 0x402c2a
cmp ecx, esi
jbe 0x402d1f
mov ecx, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebp
mov eax, dword [esp + 0x288]
lea edx, [esp + 0x70]
push edx
push eax
push ebx
push edi
call fcn.004030c0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x402d2f
lea ecx, [esp + 0x10]
lea edx, [esp + 0x70]
push ecx
push edx
push ebx
call fcn.00403510
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x402ce7
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x38]
push eax
push ecx
call fcn.00403780
mov esi, eax
add esp, 8
test esi, esi
jne 0x402cdc
test edi, edi
je 0x402c9d
push 0x64
push 4
push 0x404
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x28c]
sub eax, 0x3c
sbb ecx, 0
push edx
push ecx
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x44]
push edx
push eax
push ebx
push edi
call fcn.00402e70
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x402cdc
lea ecx, [esp + 0x70]
push ecx
call fcn.004033a0
add esp, 4
mov edx, dword [esp + 0x10]
push edx
call ebp
test esi, esi
je 0x402d2f
test edi, edi
je 0x402cfb
push 0x64
push 6
push 0x404
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x288]
lea ecx, [esp + 0x70]
push eax
push ecx
push ebx
push edi
call fcn.004031c0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x268
ret
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 0xd001a000
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x268
ret