Function at 0x40e840
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push 0xffffffffffffffff
push eax
call dword [sym.imp.SHELL32.dll_DragQueryFileW]
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], ecx
cmp eax, edi
jle 0x40eb1d
jmp 0x40e872
xor edi, edi
mov eax, dword [ebp + 0xc]
push 0x104
lea edx, [ebp - 0x458]
push edx
push ecx
push eax
call dword [sym.imp.SHELL32.dll_DragQueryFileW]
push 0x206
lea edx, [ebp - 0x24e]
xor ecx, ecx
push edi
push edx
mov word [ebp - 0x250], cx
call sub.MSVCRT.dll_memset
xor eax, eax
add esp, 0xc
push edi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x250]
push eax
push 0x104
lea ecx, [ebp - 0x458]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x40]
push 5
push eax
mov dword [ebp - 0x3c], edi
mov dword [ebp - 8], edi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
cmp esi, edi
je 0x40e969
push 0xffffffffffffffeb
push esi
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov edi, eax
lea ecx, [edi + 0x14]
push ecx
lea ecx, [ebp - 0xc]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_class_C2bString_const__]
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x250]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
lea ecx, [ebp - 0xc]
sete bl
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
test bl, bl
jne 0x40e93f
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x40e8f0
jmp 0x40e969
test esi, esi
je 0x40e969
push 0
mov eax, edi
call fcn.00404180
test al, al
je 0x40eb0d
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x40]
push 0
push esi
push 0x221
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [0x4250cc]
mov esi, dword [ecx]
call dword [sym.imp.Ngs3.dll_public:_unsigned_int___thiscall_C2bString::GetLength_void_const]
push eax
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
lea ecx, [ebp - 0x458]
sete bl
push ecx
mov byte [ebp - 1], bl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
jne 0x40e9a6
test bl, bl
je 0x40e9ad
mov dword [ebp - 8], 2
lea ecx, [ebp - 0x18]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CTextStore::constructor_void_]
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorW]
mov ebx, dword [sym.imp.USER32.dll_SetCursor]
push eax
call ebx
mov esi, eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x458]
lea edx, [ebp - 0x250]
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x30], 0x14
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], fcn.0040f4b0
call dword [sym.imp.Ngs3.dll_public:_int___thiscall_CTextStore::Load_wchar_t_const___struct_CTextStore::LOADPARAM__]
mov dword [ebp - 0x40], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x40]
cmp ecx, 0xffffffff
jne 0x40ea6c
cmp eax, 2
jne 0x40ea4f
cmp byte [ebp - 1], 0
jne 0x40ea62
push 0x23
push 0xb6
call fcn.00415b10
add esp, 8
sub eax, 2
je 0x40eb01
sub eax, 4
jne 0x40eb01
mov edx, dword [0x425614]
mov dword [ebp - 0x48], eax
mov eax, dword [0x425610]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], eax
jmp 0x40eaf2
cmp eax, 0x4c7
je 0x40eb01
test eax, eax
je 0x40eb01
call fcn.004155d0
jmp 0x40eb01
test ecx, 0xf00
je 0x40eaab
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x40ea8e
mov edx, dword [0x425630]
push 8
push eax
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x20]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x24]
mov dword [edx], eax
mov ecx, dword [ebp - 0x40]
test ecx, 0xd00
je 0x40eaab
or dword [ebp - 8], 0x20
cmp byte [ebp - 1], 0
jne 0x40ead2
and ecx, 0x100
neg ecx
sbb ecx, ecx
not ecx
and ecx, dword [ebp - 0x3c]
mov edi, 0x4250c0
push ecx
lea ecx, [ebp - 0x250]
push ecx
call fcn.00415d20
lea ecx, [ebp - 0x18]
call dword [sym.imp.Ngs3.dll_public:_void____thiscall_CTextStore::ToHandle_void_]
cmp dword [ebp - 0x3c], 0
mov edx, dword [ebp - 8]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
jne 0x40eaf2
mov eax, dword [0x425614]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp + 8]
push ecx
lea eax, [ebp - 0x250]
call fcn.0040d820
push esi
call ebx
lea ecx, [ebp - 0x18]
call dword [sym.imp.Ngs3.dll_public_virtual:_void___thiscall_CTextStore::destructor_void_]
mov ecx, dword [ebp - 0x10]
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [ebp - 0x1c]
jl 0x40e870
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.SHELL32.dll_DragFinish]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8