Function at 0x54a490
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c673
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x5da084]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x10], 0
cmp byte [0x5df50d], 0
je 0x54a4db
push dword [edi]
push str.GsGetFileSize:__s_n
call fcn.005438c0
add esp, 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.005447c0
add eax, 0x10
mov dword [ebp - 0x24], eax
sub esp, 8
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.0054aa10
lea ecx, [ebp - 0x20]
call fcn.00414d80
mov ebx, dword [ebp + 0xc]
lea edx, [ebp - 0x20]
push ebx
push dword [ebp + 8]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.00548be0
add esp, 8
or edi, 0xffffffff
test al, al
jne 0x54a539
xor bl, bl
jmp 0x54a82f
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x34], eax
call fcn.00414d80
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x34]
cmp eax, 0xffffffff
je 0x54a6b0
test eax, eax
je 0x54a6b0
lea ecx, [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x54a685
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov edx, eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.00544000
add esp, 4
mov esi, eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 8
call fcn.00414d80
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x10], 8
push dword [ecx - 0x10]
push ecx
mov ecx, str.Cannot_get_size_of
call fcn.00416660
mov edx, ecx
lea ecx, [ebp - 0x1c]
push eax
call fcn.00544610
add esp, 0xc
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 9
call fcn.00414d80
mov edx, dword [ebp - 0x1c]
mov ecx, 0x5cb81c
mov dword [ebp - 0x10], 0x18
call fcn.00416660
push eax
push ecx
push dword [edx - 0x10]
lea ecx, [ebp - 0x18]
call fcn.00544610
add esp, 0xc
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xa
call fcn.00414d80
mov eax, dword [esi]
lea ecx, [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x10], 0x38
push dword [eax - 0x10]
push eax
push dword [edx - 0x10]
call fcn.00544610
add esp, 0xc
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.00544730
mov ecx, dword [ebp - 0x14]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a65c
cmp dword [ecx + 4], 0
jle 0x54a65c
push ecx
call fcn.00577de8
add esp, 4
mov ecx, dword [ebp - 0x18]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a67d
cmp dword [ecx + 4], 0
jle 0x54a67d
push ecx
call fcn.00577de8
add esp, 4
mov ecx, dword [ebp - 0x1c]
jmp 0x54a7a5
xor ecx, ecx
or ecx, eax
cmp byte [0x5df50d], 0
mov eax, dword [ebp - 0x2c]
mov dword [esi], ecx
mov dword [esi + 4], eax
je 0x54a6a9
push eax
push ecx
push str.GsGetFileSize:_n64FileSize_lld_n
call fcn.005438c0
add esp, 0xc
mov bl, 1
jmp 0x54a802
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov edx, eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.00544000
add esp, 4
mov esi, eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00414d80
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x10], 1
push dword [ecx - 0x10]
push ecx
mov ecx, str.Cannot_open_size_of
call fcn.00416660
mov edx, ecx
lea ecx, [ebp - 0x14]
push eax
call fcn.00544610
add esp, 0xc
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.00414d80
mov edx, dword [ebp - 0x14]
mov ecx, 0x5cb81c
mov dword [ebp - 0x10], 3
call fcn.00416660
push eax
push ecx
push dword [edx - 0x10]
lea ecx, [ebp - 0x18]
call fcn.00544610
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.00414d80
mov eax, dword [esi]
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x10], 7
push dword [eax - 0x10]
push eax
push dword [edx - 0x10]
call fcn.00544610
add esp, 0xc
lea eax, [ebp - 0x1c]
mov ecx, ebx
push eax
call fcn.00544730
mov ecx, dword [ebp - 0x1c]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a781
cmp dword [ecx + 4], 0
jle 0x54a781
push ecx
call fcn.00577de8
add esp, 4
mov ecx, dword [ebp - 0x18]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a7a2
cmp dword [ecx + 4], 0
jle 0x54a7a2
push ecx
call fcn.00577de8
add esp, 4
mov ecx, dword [ebp - 0x14]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a7c3
cmp dword [ecx + 4], 0
jle 0x54a7c3
push ecx
call fcn.00577de8
add esp, 4
mov byte [ebp - 4], 2
mov eax, edi
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a7e8
cmp dword [ecx + 4], 0
jle 0x54a7e8
push ecx
call fcn.00577de8
add esp, 4
cmp byte [0x5df50d], 0
je 0x54a800
push dword [ebx]
push str.GsGetFileSize:_err_s_n
call fcn.005438c0
add esp, 8
xor bl, bl
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xb
call fcn.00547ff0
mov ecx, dword [ebp - 0x30]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a82f
cmp dword [ecx + 4], 0
jle 0x54a82f
push ecx
call fcn.00577de8
add esp, 4
mov ecx, dword [ebp - 0x20]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54a850
cmp dword [ecx + 4], 0
jle 0x54a850
push ecx
call fcn.00577de8
add esp, 4
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lock xadd dword [eax + 8], edi
dec edi
test edi, edi
jg 0x54a86f
cmp dword [eax + 4], 0
jle 0x54a86f
push eax
call fcn.00577de8
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret