Function at 0x450340
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x589a08
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f4760]
xor eax, esp
push eax
lea eax, [esp + 0x54]
mov dword fs:[0], eax
mov ebx, ecx
mov ebp, dword [esp + 0x64]
lea edi, [ebp + 0x50]
mov dword [esp + 0x28], edi
mov esi, edi
mov dword [esp + 0x24], vtable.CAutoRWLock.0
mov byte [esp + 0x2c], 1
call fcn.00403d40
mov dword [esp + 0x5c], 0
mov esi, ebp
call fcn.00450890
mov eax, dword [ebx]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x4503f7
call fcn.00450a30
mov esi, eax
test esi, esi
jge 0x4503fa
mov dword [esp + 0x5c], 0xffffffff
lea eax, [edi + 8]
push eax
mov dword [esp + 0x28], vtable.CAutoRWLock.0
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, dword [edi + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
add edi, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x45063e
mov dword [ebp + 8], eax
lea esi, [ebp + 0xa0]
push str.Global_
mov edi, 7
mov eax, esi
call fcn.004033b0
mov ebx, dword [ebx]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
xor ebx, ebx
cmp eax, ebx
jne 0x450424
xor ecx, ecx
jmp 0x450439
mov ecx, eax
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x450430
sub ecx, edi
push eax
push esi
mov edx, ecx
call fcn.00403150
push 1
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push 1
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov eax, dword [ebp + 8]
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x40]
push eax
mov dword [esp + 0x38], 0xc
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x4504a3
call fcn.00450a30
xor edi, edi
cmp eax, edi
jl 0x4504b3
mov eax, dword [esp + 0x1c]
jmp 0x4504a5
xor edi, edi
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov ebx, ecx
mov eax, dword [esi]
lea esi, [ebp + 0x80]
lea ecx, [esp + 0x30]
lea edx, [esp + 0x64]
call fcn.0044ffc0
mov esi, eax
cmp esi, edi
jl 0x4505ff
mov esi, dword [ebp + 0x7c]
mov edx, dword [esp + 0x14]
push esi
mov dword [ebp + 0x30], edi
mov dword [ebp + 0x34], edi
mov edi, dword [ebp + 0x78]
push edi
push ebx
push edx
call fcn.004ada70
push esi
push edi
push edx
push eax
call fcn.004adae0
mov dword [ebp + 0x40], eax
mov ecx, eax
mov eax, edx
mov dword [ebp + 0x44], edx
cmp eax, esi
jb 0x450512
ja 0x450508
cmp ecx, edi
jb 0x450512
sub ecx, edi
sbb eax, esi
mov dword [ebp + 0x40], ecx
mov dword [ebp + 0x44], eax
mov edx, dword [ebp + 0x40]
mov eax, dword [esp + 0x14]
mov edi, dword [ebp + 0x44]
sub eax, edx
mov ecx, ebx
sbb ecx, edi
js 0x45052a
jg 0x45052e
test eax, eax
jae 0x45052e
xor eax, eax
xor ecx, ecx
push 2
push 4
mov dword [ebp + 0x38], eax
mov eax, dword [ebp + 8]
push edi
mov dword [ebp + 0x3c], ecx
mov ebx, dword [ebp + 0x38]
lea esi, [ebp + 0x10]
push edx
call fcn.0044fef0
test eax, eax
jl 0x45055e
mov eax, dword [ebp + 0x44]
mov ecx, dword [ebp + 0x40]
push eax
push ecx
push ebp
lea ecx, [esp + 0x20]
call fcn.00450950
mov edi, dword [ebp + 0x7c]
mov esi, dword [ebp + 0x78]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edi
push esi
push edx
push eax
call fcn.004b5890
push edx
push eax
push edi
push esi
mov dword [ebp + 0x30], ecx
mov dword [ebp + 0x34], ebx
call fcn.004adae0
mov dword [ebp + 0x40], eax
add eax, 0x10000
mov ecx, edx
adc ecx, 0
push 0
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x24]
push ecx
mov dword [ebp + 0x44], edx
mov dword [ebp + 0x38], 0x10000
mov dword [ebp + 0x3c], 0
mov edx, dword [ebp + 8]
push eax
push edx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4505ca
call fcn.00450a30
test eax, eax
jl 0x4505dd
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4505dd
call fcn.00450a30
mov ecx, dword [ebp + 0x44]
mov edx, dword [ebp + 0x40]
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x38]
push 2
push 4
push ecx
push edx
lea esi, [ebp + 0x10]
call fcn.0044fef0
mov esi, eax
test esi, esi
jge 0x45062b
xor edi, edi
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x3c], edi
mov eax, dword [ebp + 8]
cmp eax, edi
je 0x450616
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 8], edi
mov dword [esp + 0x5c], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00403e10
mov eax, esi
jmp 0x45063e
mov dword [esp + 0x5c], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00403e10
xor eax, eax
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 4